You could take advantage of <call-tag> which allows you dynamically set the
name of the tag you want to call, rather like send in Ruby
e.g. (not tested)
<def tag="nav">
<call-tag tag="#{this.state}-nav" merge/>
</def>
<def tag="active-nav">...</nav>
<def tag="disabled-nav">...</nav>
<def tag="closed-nav">...</nav>
Calling <nav> will then result in the appropriate tag being called
Tom
On 20 Jun 2010, at 02:49, Chris Apolzon wrote:
> I've looked and not seen anything like this. Is there a way to setup
> a polymorphic tag that can cleanly take into account the object's
> state in a lifecycle? i.e.
>
> <def tag="nav" for="Manuscript::Lifecycle.assigned"> (no clue what the
> syntax would really look like, Manuscript.assigned would probably be
> shortest)
>
> If not, is the 'for' mechanism in dryml something that could be
> extended without hacking the gem? And if thats not possible, is there
> something planned similar to this or would a patch/feature request be
> helpful?
>
> Thanks.
>
> --
> 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.
>
--
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.