Thanks for your reply Matt, and thanks for the clarification about the
"default" param.
It appears, however, there is an issue lurking when the tag definition
includes conditional logic. Perhaps you can suggest the right approach?
First, though, for my benefit and anyone else wrestling with this, the
following works, using the <item:> parameter (without any control logic):
<def tag="amalgamations-collection" attrs="forprint">
<collection>
<item: class="amalgamation">
<card>
<h4><name/></h4>
<b>Amalgamated on: </b><view:date_amalgamated_formatted/>
</card>
</item:>
<empty-message:><t
key="amalgamation.collection.empty_message"/></empty-message:>
</collection>
</def>
This also works, using the <card:> parameter: without the <item:> parameter:
<def tag="amalgamations-collection" attrs="forprint">
<collection>
<card: class="amalgamation">
<h4><name/></h4>
<b>Amalgamated on: </b><view:date_amalgamated_formatted/>
</card:>
<empty-message:><t
key="amalgamation.collection.empty_message"/></empty-message:>
</collection>
</def>
But, if i introduce <if><else> logic, it suddenly doesn't work again, and
gives me the "mixed parameter tags and non-parameter tags" error:
<def tag="amalgamations-collection" attrs="forprint">
<collection>
<if test="&forprint">
<card: class="amalgamation">
<strong><view:name/></strong>
<br/><view:date_amalgamated/>
<br/>
<br/>
</card:>
</if>
<else>
<card: class="amalgamation">
<h4><name/></h4>
<b>Amalgamated on: </b><view:date_amalgamated_formatted/>
</card:>
</else>
<empty-message:><t
key="amalgamation.collection.empty_message"/></empty-message:>
</collection>
</def>
Why is that? However <if> evaluates, we get a definition to be passed as the
<card> parameter. What is confusing Hobo about mixed tags?
How do we properly introduce conditional logic in this situation? If you can
explain, I will gladly draft an example with notes for Owen to include in
the guide.
Thanks,
Tim
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/Nlp0cHhKNWtQU2tK.
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.