Hi,
is there a way to select one specific child, in contrast to iterating
over all of them?
Something like <children:each slug=“child-slug”> or .
thanks
Raph
–
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org
On 20/04/07, Raphael B. [email protected] wrote:
Hi,
is there a way to select one specific child, in contrast to iterating
over all of them?
Something like <children:each slug=“child-slug”> or .
<r:find url="/path/to/child">
…
</r:find>
Farrel
Raphael B. wrote:
is there a way to select one specific child, in contrast to iterating
over all of them?
Something like <children:each slug=“child-slug”> or .
I have made a little patch for that to find a URL locally relative to
the current page:
— standard_tags.rb (revision 363)
+++ standard_tags.rb (working copy)
@@ -396,9 +398,12 @@
}
tag ‘find’ do |tag|
if url = tag.attr[‘url’]
=> [“slug = ? AND parent_id = ?”, url, tag.locals.page.id])
tag.locals.page = found
tag.expand
You just use it like find: <r:find url=“slug”>…</r:find>
Cheers,
Oliver
On 4/20/07, Oliver B. [email protected] wrote:
@@ -396,9 +398,12 @@
You just use it like find: <r:find url=“slug”>…</r:find>
Exactly what I needed!
Will this patch be applied to the svn repo?
Thanks
Raph
Cheers,
Oliver
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
–
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org
Hi Oliver,
Perhaps this should be added to Radiant’s Trac.
I would welcome this patch as well.
Regards,
Erik.
Oliver B. wrote:
You just use it like find: <r:find url=“slug”>…</r:find>
Cheers,
Oliver
–
Erik van Oosten