Webeks.net - freelance programming
freelance programming - php, Joomla, Zend ...
Home :: Articles :: Programming :: Joomla! :: Is frontpage check in Joomla 1.6

Is frontpage check in Joomla 1.6

Written by Miha

When building a Joomla template it's sometimes useful to know if we are displaying an item on a frontpage or inside pages.

 

In Joomla 1.5 we were able to check frontpage with

  1. if (JRequest::getVar('view') != 'frontpage') {
  2.  
  3. echo "We are on a frontpage";
  4.  
  5. }

Joomla 1.6 frontpage checking

In Joomla 1.6 things are similar but frontpage is not called a frontpage any more. Frontpage is now a page with featured items display. We can check it with code below.

  1. if (JRequest::getVar('view') != 'featured') {
  2.  
  3. echo "We are on a frontpage";
  4.  
  5. }

 


blog comments powered by Disqus