Forums / Setup & design / Using Override Template for New Class - I have a problem!

Using Override Template for New Class - I have a problem!

Author Message

Pierre SCALFATI

Friday 05 December 2008 1:59:11 am

Hello,

I created a new class in which I put several fields. My class is called "Experts" and stores the information of Expert persons (first name, last name, photo, domains of experience, references...). The only problem is that when I add a new form, the system adds it correctly but I don't have the labels of each attribute displayed. The system displays just the content of each field without any label before.

I would like it to display the form like that:

First name: John

Last Name : DOE

Domains : Mathematics, Astronomy
...

I created an override template and unfortunatly, the system keeps on diplaying the data without respecting my template and I think that it doesn't use my template at all despite the fact that my class is declared as using the override template mentionned...

Thank you for your help.

Sejal Paliwal

Friday 05 December 2008 3:17:18 am

Hi Pierre,

You need to add something like this in your /node/view/... template - >

<b> First Name :</b> {attribute_view_gui attribute=$node.object.data_map.first_name} <br>
<b> Last Name :</b>{attribute_view_gui attribute=$node.object.data_map.last_name}  <br>
<b> Domains :</b>{attribute_view_gui attribute=$node.object.data_map.domains}  <br>

where first_name, last_name and domains would be your attribute name.

Pierre SCALFATI

Friday 05 December 2008 3:43:19 am

Hello Sejal,

Thank you very much for your reply. That's what I tried to do from the very beginning but unfortunatly the system keeps on displaying the default template and not the one I created.

In my class definition, under the definition of the class I have the following override template definition :
fre fiche_expert_visualisation /content/collectedinfo/feedback.tpl extension/ezwebin/design/ezwebin/override/templates/fiche_expert_visualisation.tpl

And this is precisely the template I want it to use, but it doesn't use it. In my override.ini.append.php, I have the following information :

[fiche_expert_visualisation]
Source=content/collectedinfo/feedback.tpl
MatchFile=fiche_expert_visualisation.tpl
Subdir=templates
Match[class_identifier]=personne

"personne" is the identifier of my class.

What else can I do to make it use the good template ?

Many Thanks.

Pierre SCALFATI

Friday 05 December 2008 4:03:08 am

Other problem now : I'm having strange debug lines or I don't know what diplaying in my pages of content (on the front-office), just like that:

extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tpl

 

design/standard/templates/content/datatype/view/ezxmltags/table.tpl

extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/tr.tpl

design/standard/templates/content/datatype/view/ezxmltags/td.tpl


design/standard/templates/content/datatype/view/ezxmltags/td.tpl

 

extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/tr.tpl

design/standard/templates/content/datatype/view/ezxmltags/td.tpl

extension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/factbox.tpl

André R.

Friday 05 December 2008 4:04:08 am

You are overriding the collected info feedback view, the one you get after you have sent a info collector (a poll or a form).
If you want to override the normal full view, then you should use node/view/full.tpl as "Source".

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Pierre SCALFATI

Friday 05 December 2008 4:38:56 am

OK, André, this has resolved the problem of debug lines displayed in my content pages. Many thanks to you. But my override template is always not currently used to display the data of my "personne" class.

Any idea about that ?

Thanks.