how to override the article template

Author Message

justin kazadi

Monday 17 March 2008 6:10:02 am

hello all,

I want to override the article template. I had done this:

- open the file in : \siteaccess\ezwebin_site\override.ini.append.php

- write this at the top of file :

[full_article]

Source=node/view/full.tpl

MatchFile=full/article_just.tpl

Subdir=templates

Match[class_identifier]=article

- save the file article_just.tpl in :

C:\wamp\www\prosite\site\extension\ezwebin\design\ezwebin\override\templates\full

- the file contains this in particular (for all articles of the site):

<div id="corps">


<h1> just lundi {$node.object.name|wash()} </h1><br/><br/>

<div class="informations">

<h1> News de la part de : {$node.data_map.owner.author|wash()}

Le {$node.object.modified|l10n('shortdatetime')} </h1>

</div>




<div class="contenu">

<p>{$node.object.data_map.body.content.output.output_text}</p>

</div>


</div>



Is there samebody who can help me to resolve this problem?




The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

Clemens T

Monday 17 March 2008 6:23:57 am

Try clearing the cache (via admin interface and the setup tab).

Does it work?

justin kazadi

Monday 17 March 2008 6:44:54 am

hello,

I have claer the cashes , restart my computer but nothings special.

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

Pål Messenlien

Monday 17 March 2008 7:24:47 am

Check in the same override.ini.append.php file if there is another override for the article class... look for [article] in the file. If there is one, this one overrides your new override.

--------------------------------------------
Høgskolen i Lillehammer
Lillehammer University College
http://www.hil.no
--------------------------------------------
Messenlien IT
http://messenlien.com
-------------------------------------------

justin kazadi

Monday 17 March 2008 7:56:35 am

thanks Pål Messenlien,

I think it work because now i have an error in my code like this :

Error: eZTemplate:eZTemplateCompiler

PHP variable $var['body'] does not exist, cannot fetch the value.

Error: eZTemplate:eZTemplateCompiler

PHP variable $var is not an object, cannot fetch content()

The problem now is i don't know how to display :

- the name of author ,

- the intro of an article ,

-the last modified date ,

- the body of article

for the article called .

my code for do this is in my first message .

please help me.

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

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