Forums / Developer / How to create a line view template for a node?

How to create a line view template for a node?

Author Message

Eason Huang

Wednesday 04 March 2009 11:52:16 pm

How to create a line view template for a node?

And what are the differences between full view mode and line view mode?

Thanks advance!!

skype:hyslx27

hyslx27@gmail.com

justin kazadi

Thursday 05 March 2009 12:52:47 am

Hi Eason,

if you want to create an view line of an node (for example for the content classe article ), first of all you must create an folder named line in for example

... override/templates/node/view/line/ 

directory. after this create an override rule in your override.ini like this :


[line_article_]
Source=node/view/line.tpl
MatchFile=node/view/line/article.tpl
Subdir=templates
Match[class_identifier]=article

the difference between the full view and the line view for me is that:

the full view is used to display all the attributes of the current node
but the line view is used for example if you want to display some attributes of an content class if you are in an
node who is an container (like a folder content class).

i think this can help you.

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

Eason Huang

Thursday 05 March 2009 2:26:50 am

Thank you very much! Justin!

This is the second time you help you solve my problem, I am a beginner of eZ publish.

Hope you give me more helps in the future.

Thanks again!!

skype:hyslx27

hyslx27@gmail.com

Noicokuna Niemoge

Thursday 05 March 2009 4:00:32 am

You helped me as well. :) Thanks :)

Shiki soku ze ku...

David Wen

Tuesday 24 May 2011 12:16:02 pm

Me too. Thanks Justin! I wish you could write the eZ Publish documentation.

Could you explain differences between block, block_item, gutter and gutter_relation as well?