Rodney Haynie schrieb:
> I have a situation where I would like to override the meta description
> on particular pages.  But on almost all of the rest I would like the
> default meta description.
> 
> For example, in master.html I have:
>     <meta name="description" content="This is a really cool site." />
> 
> Then on home.html I have:
>     <meta name="description" content="Something different" />
> 
> But when the Home page renders, the source shows both meta elements.
> 
> Is there a way to automatically override a specific element on the child
> template?
> 
> Is it possible without having to have a meta description element on each
> template file?
> 
> I thought py:replace="''" would have something to do with it, but to no
> avail.

We currently use something along these lines, not sure if there is a 
more elegant solution

master.html

<head>
   <title py:if="defined("title")" py:content="title"/>
</head>

home.html

<?python
title = "some title"
?>


Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to