I have to "clean" and create a few links, for example, Cheese?
so I have this construct
<li><a href="${h.url_for(url.replace(' ', '_').replace('?',
'').lower()) |trim}">${url}</a></li>
this, I thought is not scalebale and messey so I thought I could
create a function for cleaning:
<%def name="clean_link(link)">
${link.replace(' ', '_').replace('?', '').replace('!', '').lower()}
<% return link %>
</%def>
<li><a href="${h.url_for(clean_link(url)) | trim}">${url}</a></li>
unfortunately, this does not produce the right links anymore with
url_for(), it cleans the link, but all the subdirectories in the link
are gone.
What would be the best way to go about this?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---