The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
About widgets in article pages
Hello,
I'm looking for a mod that would let me have a widget in the front-page (content.php) but not in the articles page. Let say I would like to have a banner or a video in the front-page only...and when a person clicks on an article that banner is not there.. just in the front-page. Can this be done? |
#2
|
||||
|
||||
You may create a widget and use a custom template with the widget (enter name into Configure screen) and then put a condition around the template to only show it on the main page.
|
#3
|
|||
|
|||
Sorry but I'm not much of a programmer... can you tell me how to do it.. thanks
|
#4
|
||||
|
||||
Well, I'm not going to do it for you (and I can't since you didn't provide enough info), but copy the template that the widget uses (as I said, it is listed in the Configure screen) and put it in a new template and then put a condition around it - something like this:
HTML Code:
<vb:if condition="$_GET['r'] == '1-your-page-name' OR !$_GET['r']"> template code </vb:if> |
#5
|
|||
|
|||
Quote:
The only thing I have to change is where it says 1-your-page-name right?... that would be content.php right? |
#6
|
||||
|
||||
No, it would be the name of the home page. Many leave out that part of the condition because usually you get there via just clicking Home and then there is no r=whatever at the end of the url. But, if you go there via a link, it will have that attached at the end.
|
#7
|
|||
|
|||
Get it
So the code would be like this... right? Code:
<vb:if condition="$_GET['r'] == '' OR !$_GET['r']"> template code </vb:if> Perfect... it's working great Thank you very much |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|