![]() |
How to change the meta description? vboptions[description]?
Folks I have a custom template which I use to output custom pages outside normal forum functionality.
I want to change the keywords and description metas which in the headinclude look like HTML Code:
<meta name="description" content="$vboptions[description]" /> PHP Code:
PHP Code:
HTML Code:
$stylevar[htmldoctype] $vbulletin->options['description'] = "AVForums reviews"; and $vboptions['description'] = "AVForums reviews"; and neither work. Any ideas please? |
Anyone?
|
Maybe you could make a plugin on hook parse_templates like this:
Code:
if (THIS_SCRIPT == 'reviews') Or maybe in your code you could do a preg_replace() on $headinclude after global.php is included, and replace the meta tags. |
Thanks. It's not until I'm a bit into the script that I know what description I want to have. It's kind of a problem and I think I might have to create a custom version of global.php just for these special pages.
|
OK, how about this: in the headinclude template put
Code:
<if condition="THIS_SCRIPT != 'reviews'"> around the meta tags, and in your template put a new variable where you want the description meta tags to be (or maybe copy the entire meta tag block from headinclude to your template and replace the variables as needed), then you have until the template eval to set that variable. |
All times are GMT. The time now is 12:52 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|