Jump to content

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

Check if I am on homepage Rate Topic   - - - - -

 
  • DELTA9000
  • Senior Member
  • Authorized Reseller
  • Join Date: 17-Apr 07
  • 356 posts

Posted 25 August 2010 - 02:43 PM #1

I have a question v2.1
I was using this check:
{if $content_tpl == "views/index/index.tpl"}

thinking that would be the homepage view to code some specific items into the tpl files - but this is the results for the search page and probably a few others - anyone know what i need to check for - used the debug template - but dont see anything that specificially identifies the homepage over the other pages

Thanks

 
  • gginorio
  • Senior Member
  • Members
  • Join Date: 19-Oct 09
  • 333 posts

Posted 25 August 2010 - 05:02 PM #2

The one thing unique to the homepage is that is doesn't have a query string. The second you add a query string it parses a different page. So the home page will either be just the domain or the domain + index.php.

 
  • typo3lab
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Mar 07
  • 81 posts

Posted 21 November 2010 - 09:49 AM #3

for home pages this seems to works:
{if $smarty.request.dispatch=='index.index'}

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11362 posts

Posted 22 November 2010 - 02:43 AM #4

{if $controller == 'index'}

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.