Why did we open this can of worms? Massimo
On Aug 13, 11:03 am, Jonathan Lundell <[email protected]> wrote: > On Aug 13, 2009, at 8:49 AM, Julio wrote: > > > > > I agree, I do not use routes.py in any of my apps, yet I use URL() on > > every page that references a ..URL.., no rewriting of code in case you > > decide to use routes.py eventually. > > > What I did in my code above was to use simple HTML tags and a url > > helper method to properly render the url in the href attribute of the > > <a> tag, just for clarification.. same outcome, easier to read imho. > > Now that the helpers support both HTML and XHTML doctypes, I'd like to > see helpers for self-closing tags do the right thing, depending on > doctype. For example, BR() would generate <br> or <br /> > appropriately, and similarly for HR, IMG, META, etc. > > I don't quite see how to mechanize that, though.... > > > > > On Aug 13, 8:34 am, Jonathan Lundell <[email protected]> wrote: > >> On Aug 13, 2009, at 8:08 AM, Julio wrote: > > >>> <ul> > >>> {{for obra in obras:}} > >>> <li><a href="{{=URL(r=request, f='mostrar', > >>> argc=[obra.id])}}" > >>> title="">{{=obra.numero}} {{=obra.nome}}</a></li> > >>> {{pass}} > >>> </ul> > > >>> Why do you want to use "HTML Helpers".. well.. in HTML??, please > >>> don't > >>> get me wrong, I am not complaining about your code in particular, > >>> but > >>> in html helpers themselves, IMHO they can potentially create really > >>> nasty views (and don't get me started on using them in > >>> controllers :) > > >> Calling URL() is necessary if you're rewriting with routes.py. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

