Amending <head> for specific page

A place to discuss and receive support for LCMS (Little Content Management System)

Amending <head> for specific page

Postby njw » Tue Nov 11, 2008 1:08 am

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
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Wed Nov 12, 2008 11:06 am

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}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Many thanks Steve

Postby njw » Wed Nov 12, 2008 11:21 am

yet again. My problem is not knowing what the correct variables are! Well, one of them, anyway.

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Next issue

Postby njw » Thu Nov 13, 2008 11:14 pm

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
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm


Return to LCMS Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved