It certainly seems possible.
pseudo code alert.
<def tag="tabs">
<set-scoped tabs="&[]">
<ul param="default"/>
<repeat with="&scope.tabs">
<div .../>
</repeat>
</set-scoped>
</def>
<def tag="tab" attrs="label">
<% die if scoped.tabs.nil?
scope.tabs << [label, parameters.default] %>
<div>
<%= parameters.default %>
</div>
</def>
I think you've figured out all of this except for the
"parameters.default" part which is what I think you were asking for.
cheers,
Bryan
On Fri, Aug 19, 2011 at 2:33 PM, kevinpfromnm <[email protected]> wrote:
> Not exactly the most descriptive but maybe an example will help.
>
> <div id="wrapper">
> <ul>
> <li><a href="#item1">Item 1 label</li>
> ...
> </ul>
> <div id="item1">Item 1 text</div>
> <div id="item2">Item 2 text</div>
> ...
> </div>
>
> Ideally, I'd like to be able to define a tag such that use becomes:
>
> <tabs>
> <tab label="Item 1 label">Item 1 text</tab>
> <tab label="Item 2 label">Item 2 text</tab>
> ...
> </tabs>
>
> With the label attributes being used up in the <li> to create the labels.
> Unfortunately I can't see a way to do that, unless it's possible to store
> the value of a parameter, remove it from it's current placement and reuse it
> later. Then it might be doable with scoped variables.
>
> Any suggestions? I know I could manually add the separate headers but I'd
> like to be able have a clean (re)usable end product.
>
> --
> 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/-/tr9nm0otPPkJ.
> 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.