The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
widget only on one page.
i have created a static html widget,
and i want it to be shown only on the main page. i mean, when someone navigates to an article for e.g , this widget will dissappear. to see what i mean, you can go to www.emath.co.il and click the menu on the right side.. the articles are changed, but the top widget stays. any ideas? thanks |
#2
|
||||
|
||||
Your example is of a widget that stays on all article pages, but it sounded like you wanted a widget that disappears on all article pages. Can you clarify this?
If you want a widget to disappear on some pages that are in the same section, you will have to create a custom template for it that has a condition around it to only show on page x (node == x). Insert that custom template name in the Configure screen for the widget. |
#3
|
|||
|
|||
can u give me the full condition for that ?
|
#4
|
||||
|
||||
You'd have to look in the template to see what the variable name is. I can't just guess. It would be something like:
<vb:if condition="$variable[node] == x">stuff</vb:if> You may be able to use r. <vb:if condition="$_GET[r] == x">stuff</vb:if> |
#5
|
|||
|
|||
sorry , i dont understand...
this is the only code ive in the template : Quote:
i want that this widget will appear only on the first page . if navigating to other category or artice, the widget will be gone. from where i need to get the variable name ? u said "to look in the template to see what the variable name is" ive paste the template code :S and what is X ? thank alot lynne. |
#6
|
||||
|
||||
The template gets evaled somewhere and variables get used in it. If all that is in it is that one line, then I honestly don't know what variable you can use. Usually there is code right before a template is rendered in the code and all the variables get defined that you may use in that template. You'd have to find where it is evaled to see what the name of the variable is.
As for x, x is the nodeid. |
#7
|
|||
|
|||
i think you misunderstood me.
i need a if condition that will do this : if main cms page render the widget[widget code] else dont render the widget if end is that what u guide me to ? if so, where can i search where the template gets evaled..? |
#8
|
||||
|
||||
And that is what you would be doing if you put and if condition around it based on the nodeid.
I don't know where you are evaling that template. It's not a default template. Since you said it's an html widget, I'd guess in the widget/static.php file. I'm thinking you are going to have to just go with $_GET[r] (r is in the browser url of the page) |
#9
|
|||
|
|||
ive tried like these ways (none of them worked) :
Quote:
Quote:
|
#10
|
|||
|
|||
any help please?
where do i get the nodeid ? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|