| Thursday 11 November 2004 1:09:27 am 
                                                                 Our community page is made up of related objects. The page is simply a XML field with a table. A related object is placed inside each of the table cells. The embed template fetches the 5 newest children and display them in a unorderd list. To achieve this you must create an embed override template for the class you want to edit. Example of an override entry: 
[embed_class_article]
Source=content/view/embed.tpl
MatchFile=embed_class_article.tpl
Subdir=templates
Match[class]=2
 And in your embed template fetch and display children. Example: 
{let items=fetch('content','list',hash( parent_node_id, $object.main_node_id,
                                        limit, 5,
                                        class_filter_type, include,
                                        class_filter_array, array( 'comment' ),
                                        sort_by, array( array( 'published', false() ) ) ) )}
{section show=$items}
    <ul>
    {section var=Child loop=$items}
        <li><a href={$Child.item.url_alias|ezurl}>{$Child.item.name|wash}</a></li>
    {/section}
    </ul>
{/section}
{/let}
The above example will fetch 5 children of class 'comment' and display them in a list. (as on the community page). If you want to change the appearance of your site the .css files is the place to edit. A basic site is made up of 3 .css files. core.css, site.css and a color css. A good way to find out which css is used on your site is to view the source. In Internet Explorer do this by View -> Source. Ole M. Senior Software Engineer - Vision with Technology
 http://www.visionwt.com
 http://www.omh.cc
 http://www.twitter.com/omh
 
 eZ Certified Developer
 http://ez.no/certification/verify/358441
 http://ez.no/certification/verify/272578
 |