The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi there,
I have a custom page in my vB and I want to add meta keywords depending on what I'm outputting. I tried doing stuff like $vb->options/$vboptions['keywords'] .= ', new keyword'; before I fetched any templates or did any output, but the keywords won't be added, so it seems the headerinclude template already gets parsed when I just include global.php Any way to get around this? Thanks ![]() |
#2
|
||||
|
||||
![]()
You can add conditionals in the headinclude template to do this.
|
#3
|
|||
|
|||
![]()
OK, I tries this, but no luck. It really seems like the headerinclude template gets parsed before any of my code gets executed, so the conditional that checks for my stuff always finds nothing.... Any ideas what I'm doing wrong?
I'll take a look at the threadview stuff now, as it is using conditionals too.... --------------- Added [DATE]1214578283[/DATE] at [TIME]1214578283[/TIME] --------------- OK, this is my solution now: I added headinclude to the global templates I add keywords via $vbulletin->options['keywords'] .= ', my keyword'; And then I do a eval('$headinclude = "' . fetch_template('headinclude') . '";'); before I fetch the final page template that uses $headinclude... |
#4
|
||||
|
||||
![]()
Use the parse_templates hook to do whatever you need to. Then you can use data from that hook in headinclude.
|
#5
|
|||
|
|||
![]()
Just edit the headinclude template directly and add the HTML you want to.
|
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|