Page 1 of 1

Amending <head> for specific page

PostPosted: Tue Nov 11, 2008 1:08 am
by njw
Steve

I want to embed some software into one LCMS page. Is there an easy way to add code to the <head> tag for a single page, rather than for all the pages (via Main template)?

Many thanks

Neil

PostPosted: Wed Nov 12, 2008 11:06 am
by shannah
You could put an if statement in the main template.

e.g.
Code: Select all
{if $page->val('path') == 'mypath'}Your special content here{/if}

Many thanks Steve

PostPosted: Wed Nov 12, 2008 11:21 am
by njw
yet again. My problem is not knowing what the correct variables are! Well, one of them, anyway.

Neil

Next issue

PostPosted: Thu Nov 13, 2008 11:14 pm
by njw
The {if} statements are working i.e. they are selecting the correct page, but I am trying to execute php code and because MainTemplate is a .html, the php code is not executing.

Can I rename the MainTemplate to be a .php or is there a less drastic solution?

Many thanks

Neil