Hi guys, please bear with me as I'm sure this is a complete newbie
question, but I'm starting to go nuts with kid. Things just don't fall
into their places with py:extends, py:match, py:replace for me. I
originally had a nice elementtree based approach where I
programmatically was constructing the html output but since using a
template language is all the rage these days I couldn't resist and
started using kid (with little success, although I went through
http://docs.turbogears.org/1.0/HeadersFooters,
http://www.kid-templating.org/trac/wiki/LayoutTemplateRecipe,
etc,etc).

So the situation is very simple, I have a master.kid containing common
stuff like <head> and some header/footer text that should be the same
on every page and would like to have individual page specific content
in a <div id="content> </div> container.

########### this is master.kid ###################

<html xmlns:py="http://purl.org/kid/ns#";>
<head>
    <title>Common title</title>
    <link href="/static/css/common.css" media="all" rel="stylesheet"
type="text/css" />
</head>
<body>
    <div id="header">Header which is the same everywhere</div>
    <div id="content">This should be different from page to page.</div>
    <div id="footer">Footer which is the same everywhere</div>
</body>
</html>

######### this is welcome.kid ################

<html xmlns:py="http://purl.org/kid/ns#";>
<div id="content">You are viewing 'welcome'</div>
</html>

Note that in welcome.kid I don't want to have anything like <head>,
<body>, etc, etc, only the stuff that should be different on that
page, namely the <div id="content> container. This is the thing I
couldn't figure out from the docs.

So where do I need to put py:match, py:replace, py:extends?

Cheers,
Daniel

--~--~---------~--~----~------------~-------~--~----~
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