[Nitro] gen and parts

gabriele renzi surrender_it at yahoo.it
Wed Aug 9 05:47:25 EDT 2006

Fabian Buch ha scritto:
> Am 09.08.2006 um 10:30 schrieb gabriele renzi:
>>Fabian Buch ha scritto:
>>><img src="#{TestPart.public}/media/test.png" />
>>makes sense, even if I admit I prefer to set <base
>>href="#{TestPart.public}> so that I can simplify the rest of the  
>>html code.
> I'm not sure how that works. Can you elaborate?

Each time you use a link you should be using the absolute path 
/foo/media/test.png, but if you set the HTML tagh <base 
href="/foo/media/"> then you can just use src="test.png" in that page.

In my admin code, for example, I'm using something like
<base href="#{mount_path}"> in the SystemPage, to let me use very simple 
and always working html to refer to actions, withouth referring to 
complex Routes in views.
So forms become something like:
  <form action="list">
referring to self.list
and links become
  <a href="delete">
referring to self.delete.

Absolute paths still work fine, so everything is nice, but there may be 
hidden problems somewhere that I ignore.


blog en: http://www.riffraff.info
blog it: http://riffraff.blogsome.com
jabber : rff.rff at gmail dot com

More information about the Nitro-general mailing list