Code only detecting home page for some categories - Joomla! Forum - community, help and support


hello all,

as per joomla documentation on how detect front page, inserted following check in home page template index.php.

code: select all

<?php
$app = jfactory::getapplication();
$menu = $app->getmenu();
if ($menu->getactive() == $menu->getdefault()) {
        echo 'this front page';
}
?>


now home page displaying numerous modules many categories, of have own templates. when click on home, component modules not shown, if click on article, need check if page home page, if not, show alternate layout includes

code: select all

<jdoc:include type="component" />


now when click on articles, takes me default templates assigned of these categories, some, keep getting home page on , over, when url contains option=com_content....

is there way this? or missing out?

any appreciated.

cheers,
aditi

ok placed few enqueuemessage outputs , found out home page has

view = featured
menu = jmenusite
page option = com_content

i clicked on article on home page, , brought me home page view time output

view = article
menu = jmenusite
page option = com_content

but clicked on article, under different category, took me article's menu default template page. 1 though, nothing else. how happening? should place check on view? enough?





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support