a new problem

Author Message

jb bianchi

Wednesday 20 July 2005 7:15:03 am

Hello ,

Now i have an another problem.

I do this :

<b> 1. Bring up the administration interface.
2. Click on the "Design" tab.
3. Click on "Templates" (in the menu on the left hand side).
A list of template files will appear.
4. Locate "/node/view/full.tpl" and click on it.
5. On the next page, simply click "New override".
6. Type in "full_view_news_folder" into the "Filename" field.
7. Set the "Class" dropdown box to "Folder".
8. Set the "Selection" dropdown box to "News section".
9. Do not enter anything into the node field (leave it blank).
10. In the "Base template on" section, select "Empty file".
11. Click "OK".

This will generate an empty file ("design/tscm/override/templates/full_view_news_folder.tpl") and instruct eZ publish to use it every time a folder in the "News section" is viewed. Put the following lines into the file, raise the priority (with 1 being the highest), and clear the cache.
</b>

<h1>Latest news</h1>

{* Grab some of the content of the node that is being viewed. *}
{let children=fetch( content, list, hash( parent_node_id, $node.node_id,
                                     sort_by, $node.sort_array,
                                     limit, 7,
                                     class_filter_type, include,
                                     class_filter_array, array( 'article' ) ) )}

{* LOOP: For each child of the node... *}
{section name=Child loop=$children}

    {* Display the content of the child using a line-view template. *}
    {node_view_gui view=line content_node=$Child:item}

    <hr>

{* End of loop. *}
{/section}

{* End of namespace. *}
{/let}

but there is changment. My news page has not the good title. It 's keeep the title of the News folder and the short description too.
There are no <hr> tag too.

Thank's because i need help.

Stuart DH

Thursday 21 July 2005 8:03:12 am

Have you tried moving the new template up the list with a higher update priority?

The system will look through your templates and use one that fits as soon as it finds it. So if the old folder template has a higher priority than your new one, then the new one won't even get a look in.

Because the orignal template has global permissions then it also applies and will get used first, unless the new one comes before it.

http://www.wildaboutbritain.co.uk

jb bianchi

Friday 22 July 2005 12:44:34 am

I forget that I had to change the priority number.
Thank's

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.