This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » different view of a file within a folder
expandshrink

different view of a file within a folder

different view of a file within a folder

Friday 24 February 2012 6:42:41 pm - 2 replies

Hello 

I need a tutorial or something which can help me to undrestand the different view of an article or specific class within a folder. 

I really dont find any.

Thank you very much

Saturday 25 February 2012 8:30:12 am

Hello Ray,

You can create different templates for the same element.

For example the system always uses a template by dedault called "full.tpl" to showing elements.
If you call a node for view "/ (which is mostly Node with ID 2)" the system uses this template ("full.tpl"blunk.gif Emoticon for display the result.

The easiest way to implement different views on the same elements is to create a template (for example test.tpl) in your extension/design under "templates/node/view/test.tpl"
Now you can use it in other templates with the template function {node_view_gui content_node=$node view=test}

If you remember that the system normally uses always the "full.tpl" template, there must be a way to use also different templates if you have in your mind that there exists for example articles and folder.
This behavior is realized over an override mechanism. Therefore you need to create an override.ini.append.php in your extension and insert a new rule that tells the system for example to use a different template than the full.tpl when an article is viewed. Just now, this rule is used from the system to load alternative templates under different behaviors.

Greetings

Marc Krebs
circ IT

Monday 27 February 2012 9:53:29 am

Hi Marc, thank you very much for ur response,

Actually within a folder that i have created , i have different parts and the goal is that when the people click on the title they go to the main article and main page!

So I created test.tpl in line and full folder, with different content. 

and now I understood how it works.

thanks again

Modified on Monday 27 February 2012 3:00:40 pm by ray lab

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from