Issue with children

1 view
Skip to first unread message

marlon...@gmail.com

unread,
Apr 29, 2008, 9:43:15 AM4/29/08
to comatos...@googlegroups.com
Is there a known issue with displaying children? My snippet below
will print the page title, the page's parent's children, but not the
page's children.

Thanks!

Marlon

h1. Welcome

Your content goes here...

<%= page.title %>
<%= page.parent.children %>

<%= page.children %>
<% page.children.each do |p| %>
<%= p.title %>
<% end %>


--
You see I really have to tell you
That it all gets so intense
From my experience
It just doesnt seem to make sense
Still...you turn me on


Thibaut Barrère

unread,
Apr 30, 2008, 3:23:42 AM4/30/08
to Comatose Plugin
Hello Marlon,

are you editing a comatose page through the editor ?

If so I don't believe you can use erb templates in there. Liquid
works, though (out of my brain - untested):

{{ page.title }}
{{ page.parent.title }}

{% for child in page.children %}
{{ child.title }}
{% endfor %}

see the liquid group for more informations on liquid:

http://groups.google.com/group/liquid-templates

hope this helps!

Thibaut
--
http://blog.logeek.fr

Andrew Kuklewicz

unread,
Apr 30, 2008, 6:47:50 AM4/30/08
to comatos...@googlegroups.com
FYI - you can use erb instead of liquid if comatose is so configured
I forget how, but I do it.
-Andrew
--
Andrew Kuklewicz

marlon...@gmail.com

unread,
Apr 30, 2008, 9:04:34 AM4/30/08
to comatos...@googlegroups.com
yeah, I had it configured for erb, but just now switched it back and still no children appear with liquid.  I'm going to try to use jruby/derby and see if that makes any difference next.
Reply all
Reply to author
Forward
0 new messages