Forums / Setup & design / full_class_1.tpl Design Problem

full_class_1.tpl Design Problem

Author Message

David Barker

Monday 04 August 2003 10:46:38 am

Hi,
I was going through the tutorial to try and customise the look of the content which displays the files in a folder and I did what it told me but it didn't make any difference.

I made a new file called full_class_1.tpl in /design/acne/override/templates/node/view containing this code:

{* set children variable *}
{let children=fetch('content',list,hash(parent_node_id,$node.node_id))}

<h1>{$node.name}</h1>

{* loop children and print name *}
{section name=Child loop=$children}
{$Child:item.name}<br>
{/section}

{/let}

However, when I try to view a folder which has content in it, I still get the same, old design (a little piece of paper with the title next to it) - not the title of the folder followed by just a plain list (like it should be).

I'm using version 3.1-1 btw. I was thinking maybe it was an old tutorial - in which case how do I change the template for 'full' in section 1? I looked in override.ini.append but couldn't find anything to do with it :( Thanks for any help!!

Dave

Alex Jones

Monday 04 August 2003 11:59:47 am

Dave, you will need to add your own entry to your override.ini.append if the override doesn't exist already. Something akin to:

[full_class_1]
Source=node/view/full.tpl
MatchFile=full_class_1.tpl
Subdir=templates
Match[class]=1

Also, make sure you have cleared your ini and template caches after uploading this and your templates.

Does this help?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

David Barker

Monday 04 August 2003 12:59:46 pm

Hey thanks for the help!
I just realised what it was though! (silly me) There was already an override template called folder.tpl so even after I added my info in override.ini for full_class_1.tpl, the folder.tpl was used. But I've fixed that and it works like it should now!

Thanks!!!
Dave

Alex Jones

Monday 04 August 2003 1:45:22 pm

Great to hear you figured it out. The little mistakes can often be the most vexing.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

padEE Scherer

Saturday 09 August 2003 6:24:14 am

hi all,
i think your topic is that, what makes me going insane... what i didn't understand so far is if it is necessary to make an entry in an .append file, if i use a different object number (in my case 29)? I think, then it is not necessary to create an .append file, is it?