Re: Template-trouble
Yuri Smetsers <[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Clemens, > Have You looked as the API.txt? Just did. ;) It's exactly what I was looking for. > If You want, You _can_ include another page template [...] That's kind of what I did: I created a file called 'left' in the SMI, and included it in the layout_macro. Not sure if that's the right thing to do, but it worked. This will get me started, thanks a lot! Regards, Yuri Smetsers Clemens Robbenhaar wrote: >Hi Yuri, > > some short reply: > > > > > As said, the left column is used for navigation/indexing. Example: at > > the 'people'-section, the left-column should contain a full listing of > > all employee-templates in the 'people' folder. (Each employee has its > > own template with some info.) > > I tried using a separate template called 'left', which contained a > > manually maintained listing. Not an option. ;) > > > > Is there a way to retrieve a listing of templates in a folder, filter > > and display them? > > Have You looked as the API.txt? The current version should be available here: > >http://cvs.infrae.com/SilvaDocumentation/API.txt?rev=1.12&content-type=text/vnd.viewcvs-markup > > > If You want, You _can_ include another page template (or DTML if that >fits You better) via some line like: > > <tal:block content="structure here/left" /> > >Anyway hand maintaned lists are a bad option if the software gives You >things like the "get_ordered_publishables", which is most probably what >You want to look for. > > > #2) > > > > For the menu, I used dhtmlcentral's CoolMenus. It's a Javascript-based > > script which uses it's own stylesheet. > > Our adapted version looks like this: > > > > [ item][ item ][ item ][ item ] [ ... ] > > > > Implementing the menu was quite easy, but it has to be dynamic. So if > > i.e. section News has no items, item 'News' shouldn't be visible. > > Is it possible to check for a section whether it's filled or not? > > Hm, I have never heard about this CoolMenus stuff ... however >if You want to filter for non-empty folders, You maybe could use the >"is_published" method. For folders this is true iff it contains >published objects, which is most proabaly what You want ... if would not >make a lot of sense to show a link to the 'News' section if its not >empty but none of the content objects inside are published. > >Hope this helps a little, >Clemens > > >