Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Reference Home Page Rate Topic   - - - - -

 
  • WebTek
  • Member
  • Authorized Reseller
  • Join Date: 10-Oct 07
  • 109 posts

Posted 02 April 2014 - 05:44 PM #1

I am trying to write a line of code for CS Cart v. 4.x where it recognizes if the page is on the Home (index) page or not.

I attempted a number of different syntax for this, but could not get any to work:
{if $controller =='index'}
{if $controller =='index.index'}

I was wondering if anyone knows the proper code for recognizing if the site is on the home page or not.

Ultimately, I am trying to have a banner display in the header section on the Home page only.

Thank you in advance

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1247 posts

Posted 03 April 2014 - 05:15 AM #2

Hi,
Please try
{if $runtime.controller=='index' && $runtime.mode=='index'}
...
{/if}

I hope that helps,

---
Valentin
part of hungryweb.net

 
  • WebTek
  • Member
  • Authorized Reseller
  • Join Date: 10-Oct 07
  • 109 posts

Posted 04 April 2014 - 05:14 PM #3

Perfect, I tried both of those separately but that works great.