Forums / Developer / Please help: pagelayout for modules

Please help: pagelayout for modules

Author Message

Claire Lin

Thursday 24 July 2003 3:05:29 pm

I've asked this quesiton twice, and have tried answer my own qestion by looking at the code on template in the mean time -- without success. Please help.

The quesiton is: How do I make sure that advancedsearch.tpl shows under a certain pagelayout? (Similarly, how do I make sure that the basket.tpl shows under a certain pagelayout?) Because Search and Shop are not part of the Content module, I do not know how to assign "section" (and in turn pagelayout) to them.

Anyone please give me some clue? Even just where to look for the relevant php codes will be great...

Thanks a lot in advance.
Claire

Alex Jones

Friday 25 July 2003 6:35:31 am

Out of curiousity, have you tried to turn on template debugging so it displays each template that is used on the page? This might give you an idea of where the code for search and shopping are generated.

Change the following code (disabled > enabled) in site.ini or add it to the site.ini.append for the site you are working on to enable debugging.

[TemplateSettings]
Debug=disabled

Just a thought,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Jan Borsodi

Saturday 26 July 2003 4:31:51 am

You should take a look at the kernel/user/login.php file, look at the bottom and you'll see the lines.

if ( $ini->variable( 'SiteSettings', 'LoginPage' ) == 'custom' )
$Result['pagelayout'] = 'loginpagelayout.tpl';

Which tells eZ publish to use loginpagelayout.tpl for pagelayout template instead of the standard.
The 'if' statement is only there to see if a custom layout should be used.

The downside to this method is that you have modify the code for advanced search. We generally do not recommend this due to problems with future updates.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Jan Borsodi

Saturday 26 July 2003 5:30:09 am

I started a discussion on how this can be solved without PHP code here:
http://ez.no/developer/ez_publish_3/forum/suggestions/applying_features_to_modules_and_views

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Claire Lin

Sunday 27 July 2003 10:25:33 am

Thank you~!! I've changed the relevant php code.
Claire