Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
TurboGears2: Overriding meta element on child template.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rodney Haynie  
View profile  
 More options Jul 30 2009, 6:19 pm
From: Rodney Haynie <rodney.hay...@gmail.com>
Date: Thu, 30 Jul 2009 18:19:54 -0400
Local: Thurs, Jul 30 2009 6:19 pm
Subject: TurboGears2: Overriding meta element on child template.
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.

Thanks for any help.
-Rodney


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diez B. Roggisch  
View profile  
 More options Jul 31 2009, 7:41 am
From: "Diez B. Roggisch" <de...@web.de>
Date: Fri, 31 Jul 2009 13:41:27 +0200
Local: Fri, Jul 31 2009 7:41 am
Subject: Re: [TurboGears] TurboGears2: Overriding meta element on child template.
Rodney Haynie schrieb:

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »