View Full Version : Setting styleid for a custom page?
Trana
04-26-2010, 04:31 PM
Can someone please help me with this beginner question? I cannot seem to find the answer when I search in this forum.
I am creating a custom page and need to know how to statically set the styleid for the page. I want to do it inline in the code, not in a plugin.
Thanks!
Trana
04-29-2010, 09:48 PM
Anyone know how to do this?
Lynne
04-30-2010, 02:11 AM
Why not use a plugin? I know this works:
hook location - fetch style
if (THIS_SCRIPT == 'yyyyy') {
$styleid = xx;
}If you want to put it in the code, find that hook location and add it there.
Trana
04-30-2010, 02:57 AM
I'm trying to create a whole bunch of files that should only be displayed with a styleid that I set. So I am wondering how I can set the style just before I output a template.
Lynne
04-30-2010, 02:06 PM
Several of your templates - header, headinclude, footer - are rendered when global.php is called. If you need to assign a styleid to them, you need to do so before they are rendered which means using a plugin or finding that hook location manually adding the code there.
hilaryl
10-01-2014, 05:08 AM
Why not use a plugin? I know this works:
hook location - fetch style
if (THIS_SCRIPT == 'yyyyy') {
$styleid = xx;
}If you want to put it in the code, find that hook location and add it there.
Awesome! So simple! Works a treat for those one off pages.
On a side note in vB4.x I found the hook was actually called 'style_fetch'.
Obviously an old thread, but still VERY helpful
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.