Hi!
I am creating a small website with pudge, which uses kid.
I try to modify a template, thus the selected menu entry appears with a
different style.
<?python
import pudge
def initialize(t):
g = t.generator
if not hasattr(t, 'title'):
t.title = 'Untitled'
t.doc_title = g.index_document['title']
t.home_url = g.organization_url or g.blog_url or g.trac_url
t.home_title = g.organization
t.page_item = 'page_item'
t.filename = {python code to create <filename.extension>, e.g.
"index.html" }
?>
[...]
</head>
<body>
<div id="page">
<h1 class="doc-title"><a href="${home_url}">${home_title}</a></h1>
<div id="navcontainer">
<ul id="navlist">
<li class="pagenav">
<ul>
<li class="${page_item}">
<a href="index.html"
title="Project Home / Index">Home</a>
</li>
here i need the kid function, which does this
<li class= if (filename == index.html) then "page_item" else
"page_item_selected">
I've looked in the documentation, but could not find an overview of the
functions.
Any comments or suggestions are welcome.
<li class="page_item">
<a href="doc-index.html"
title="${doc_title} Documentation Index">Docs</a>
</li>
.
--
http://lazaridis.com
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
kid-template-discuss mailing list
kid-template-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss