View Full Version : Change layout for list.php?
JustAskJulie
04-10-2012, 05:49 PM
How do i change the layout for list.php . by default it uses the default layout, I'd prefer to use one of my other layouts.
JustAskJulie
04-15-2012, 11:37 PM
No ideas on this?
Lynne
04-16-2012, 01:16 AM
Not sure if it will work, but
hook_location: vbcms_layout_querydata
if (VB_ENTRY == 'list.php') {
$this->itemid = x;
}
change x to the layoutid you want.
scarex
04-16-2012, 01:57 AM
Unfortunately doesn't work because the layout seems to be set after that hook directly by the mysql query.
I have similar need, but I'm still figuring out how to change layout dinamically.
ps: I started similar discussion some days ago here https://vborg.vbsupport.ru/showthread.php?p=2320501#post2320501
Lynne
04-16-2012, 03:49 PM
It worked just fine on my default 4.1.12 test site. My testing is to go to the Home page and click on a tag. That tag gives me the list.php page with the new layout. That is the list.php page I was trying to change.
scarex
04-16-2012, 11:58 PM
It worked just fine on my default 4.1.12 test site. My testing is to go to the Home page and click on a tag. That tag gives me the list.php page with the new layout. That is the list.php page I was trying to change.
I will check again next week, now I'm travelling for job.
In the meantime, thank you Lynne for your feedback :)
JustAskJulie
04-22-2012, 05:54 PM
It's not working for me. by itemid, is that the name of the layout or is there a layout # or id somewhere that I'm missing?
I've tried changing it the layout name using several different layouts. One of them changed the layout of the list.php bringing the primary content up as a header but still kept the default layout below it (including all the content from the default layout). Others that I tried just made the whole page disappear.
Lynne
04-22-2012, 06:12 PM
It's a number assigned to the layout - 1,2,3,etc (it's the layout *id*, not the layout title). You can view it when viewing the source code for the layout dropdown. (You WILL need to view source code to get it or get it from the database - cms_layout.layoutid.)
JustAskJulie
05-03-2012, 07:45 PM
thank you. I found the id and that worked.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.