The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
CMS Home If conditional
I am trying to figure out what the conditional is to tell if we are on the HOME PAGE of the cms
Currently I am using : <vb:if condition="THIS_SCRIPT == vbcms"> however this fires anywhere content.php is there a way to find out if the homepage is loaded. |
#2
|
||||
|
||||
You didn't say what template you are trying to put that in, so it's impossible to answer that question 100%. You want to use the $nodeid, but depending on where you use it, it's called something different and you may have to write a plugin to put it into a variable for you to use.
So, play with the $nodieid... look to see where your template is being rendered (search the files, please) - look at the code around it and you will see what your variable should be called. You may have to go 'backwards' in the code to figure out the variable name. |
#3
|
|||
|
|||
the template I am trying to do it in is "header" basically just a featured article plugin i made but I only want it to show on the homepage.
|
#4
|
||||
|
||||
|
#5
|
|||
|
|||
Thanks cellarius for the point in the right direction.
For anyone searching around this is what u have to do : open /packages/vbcms/controller/content.php After line 93 add Code:
vB::$vbulletin->nodeid = $this->node->getNodeId(); Code:
<vb:if condition="$vbulletin->nodeid == 1">........</vb:if> |
#6
|
|||
|
|||
I upgrade the software to 4.0.3 but that fix does not work anymore.
|
#7
|
|||
|
|||
Reaply the fix, it works.
The problem is now inside the articles, since the nodeid there gets diferent all the time, like, my section is nodeid 3, but inside an article of this section the nodeid is 120. |
#8
|
|||
|
|||
Hi there!
I also have the problem, I can't do a if contional on the linked section if I am in the articles, because the articles have there own ids. Any suggestion on this? |
#9
|
||||
|
||||
did anyone ever figure this out? I want to say if section and articles in that section, do something.
|
#10
|
||||
|
||||
Add a hook to vbcms_article_populate_end:
PHP Code:
Repeat for each content type needed. (warning: untested!) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|