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? 

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

eZ debug

Timing: Jan 30 2025 00:47:43
Script start
Timing: Jan 30 2025 00:47:43
Module start 'layout'
Timing: Jan 30 2025 00:47:43
Module start 'content'
Timing: Jan 30 2025 00:47:43
Module end 'content'
Timing: Jan 30 2025 00:47:43
Script end

Main resources:

Total runtime0.0138 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.2656151.2266
Module start 'layout' 0.00470.0019 739.492236.6797
Module start 'content' 0.00660.0058 776.171994.3125
Module end 'content' 0.01240.0014 870.484433.9922
Script end 0.0138  904.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002215.9986140.0002
Check MTime0.00117.7900140.0001
Mysql Total
Database connection0.00064.286010.0006
Mysqli_queries0.002215.535230.0007
Looping result0.00000.072410.0000
Template Total0.00118.110.0011
Template load0.00096.258510.0009
Template processing0.00021.800210.0002
Override
Cache load0.00064.406610.0006
General
dbfile0.002417.259680.0003
String conversion0.00000.036240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs