Hi Jim,

Thanks for the reply.

On Tue, Jun 17, 2008 at 1:18 PM, Jim Gay <[EMAIL PROTECTED]> wrote:
> You'd need to write a tag that wraps it.
>
> tag 'myext:model:if_something' do |tag|
>  tag.expand if (your code to check that value)
> end
>
> that would expand the tag only if that something is set the way you want,
> and your radius/html would look like this:
>
> <r:myext:model:if_something>
>  h1. Some Header
>
>  <r:myext:model:something />
> </r:myext:model:if_something>
>
> There are probably other ways to do it too, but that's the simplest one that
> comes to mind.

I was a bit hasty, sorry about that. The problem is slightly different:

  <div class="item">
    <h1>Some Header</h1>
    <ul>
    <r:item:each param="some value">
      <li><a href="/some/url/#{item.id}"><r:item.attrib1 />
<r:item.attrib2 /></a></li>
    </r:item:each>
    </ul>
  </div>

  <div class="item">
    <h1>Another Header</h1>
    <ul>
    <r:item:each param="another value">
      <li><a href="/some/url/#{item.id}"><r:item.attrib1 />
<r:item.attrib2 /></a></li>
    </r:item:each>
    </ul>
  </div>

where <r:item:each> returns the items from the database by param's
value. I'd like to wrap the header so that it shows only if there is
something to be shown in the list under it (inside the div). I haven't
been able to figure it out, and the best I've managed to do so far is
to repeatedly show the content I want to wrap (like its multiplied by
the list size).
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to