custom page variables

27 views
Skip to first unread message

LeviCole

unread,
Apr 10, 2010, 6:05:02 PM4/10/10
to Bonsai
Hey guys,

I am building a little site with Bonsai, and so far I love it. The
only problem I am having currently is that my index page is only
rendering the pre defined meta variables when I iterate over the
children. Just curious if I am doing something wrong. Here is what
my directory structure is like...


- content
- index
- 1.Child
- 2.Child

Each child is basically a product...I have a thumbnail picture in the
file, and a I have a product.yml file in each directory that looks
like this...

:name: Product Name
:thumbnail: /path/to/thumbnail

I am not sure if there is a better way of doing this, but I am
definitely open to suggestions. Thanks for any help you can provide.

Levi

Ben Schwarz

unread,
Apr 10, 2010, 9:41:05 PM4/10/10
to tiny...@googlegroups.com
Hi Levi, 

I would move the children to the root level.

If you wanted to list them into navigation you can loop over the `navigation` object that is available to all pages and any level. It'll give you a list of the top level pages (with 1.numbered prefixes)

Let me know how you go. 

Cheers, 

Ben
 



--
To unsubscribe, reply using "remove me" as the subject.

Reply all
Reply to author
Forward
0 new messages