Ilias Lazaridis wrote:
Ilias Lazaridis wrote:
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.
[...]
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" }
this one needed a slight change within the code, to make destfile (e.g.
"index.html") externally available.
[...]
<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">
ok, found the solution:
${'index.html'== filename and 'page_item_selected' or 'page_item'}
this one worked, in conjunction with the <a> tag and a slight
modification of the templates:
-
The full solution here:
http://lesscode.org/projects/pudge/ticket/12
.
--
http://lazaridis.com
_______________________________________________
Pudge mailing list
[email protected]
http://lesscode.org/mailman/listinfo/pudge