I do not think the current Head Nugget plugin supports this, but is there any way to get a page-specific modification to the <head>?
I need one particular function on a static page, but I would not want this function on every s9y page as it would have undesireable results.
Perhaps this should be a feature request for the Static Page plugin or the Head Nugget Plugin????
Right now, I will settle for anything that works.
Page-specific head nugget???
-
Don Chambers
- Regular
- Posts: 3659
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Page-specific head nugget???
Hi!
You'll need to make this modification in your themes index.tpl itself, as making PageNuggets specific would be a lot of coding effort.
In index.tpl it's easy. Just go to your <head> section and insert:
Of course, replace the <meta> stuff with the content you actually want/need, and replace "My staticpage" with the title of your static page!
HTH,
Garvin
You'll need to make this modification in your themes index.tpl itself, as making PageNuggets specific would be a lot of coding effort.
In index.tpl it's easy. Just go to your <head> section and insert:
Code: Select all
{if $staticpage_pagetitle == 'My staticpage'}
<meta name="desc" content="My staticpage" />
{/if}
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3659
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Thanks Garvin
1) rather than modify the index.tpl file (which I have no problem doing) - could I not just use the head nugget plugin for this code as I am already using that plugin?
2) is $staticpage_pagetitle equal to the value of <title>My Page Title</title>, or is it just the value shown in the static page drop down box?
3) what would be the equivalent of this IF statement if the page I wanted to include a page specific piece of code within the <head> for is one of my contact form pages?
1) rather than modify the index.tpl file (which I have no problem doing) - could I not just use the head nugget plugin for this code as I am already using that plugin?
2) is $staticpage_pagetitle equal to the value of <title>My Page Title</title>, or is it just the value shown in the static page drop down box?
3) what would be the equivalent of this IF statement if the page I wanted to include a page specific piece of code within the <head> for is one of my contact form pages?
=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
1.) You could use that, but then you'd require the "Smarty Markup" event plugin to execute. Else, Smarty instructions will not be parsed inside a nugget by default.
Regards,
Garvin
1.) You could use that, but then you'd require the "Smarty Markup" event plugin to execute. Else, Smarty instructions will not be parsed inside a nugget by default.
For each static page you can enter the title of the page, and that is the value of $staticpage_pagetitle.2) is $staticpage_pagetitle equal to the value of <title>My Page Title</title>, or is it just the value shown in the static page drop down box?
I believe the variable would be the same, just replaced with the title of your contactform. $staticpage_pagetitle is set by many plugins, so I hope the contact form is one of them.3) what would be the equivalent of this IF statement if the page I wanted to include a page specific piece of code within the <head> for is one of my contact form pages?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/