Try this: <title><%= title %></title>
For Hobo, string interpolation only works inside of strings. ERB processing only works on innerText. As far as I can tell, Hobo does its XML parse before doing string interpolation or ERB processing, so that's why ERB processing doesn't work on strings. As for why string interpolation doesn't work on innerText: it's probably because nobody tried doing it before. ERB processing is a superset, so nobody saw the need. As you've shown, perhaps switching from ERB to string interpolation could remove an additional abstraction, although I'm not sure how clean it would look for those tags that have a lot of ERB. cheers, Bryan On Apr 5, 10:34 pm, Mike Hogan <[email protected]> wrote: > Hi there, > > If I want to make the title of a page parameterised, I can do this: > > <def tag="test"> > <html> > <head> > <title param/> > </head> > </html> > </def> > > followed by > > <test> > <title:>Title set successfully!</title:> > </test> > > Cool. > > But what I really wanted to do was this: > > <test title="Title set successfully"/> > > So I did this with my tag: > > <def tag="test" attrs="title"> > <html> > <head> > <title>#{title}</title> > </head> > </html> > </def> > > And #{title} does not get interpolated. > > #{title} will be interpolated if its used like this: > > <title class="#{title}"> > > for example, but not when its the "innerHTML", so to speak, of a tag. > > Is this intentional? I am totally new to hobo, and I find this > behaviour surprising. > > Thanks all, > Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo 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/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
