How to show different content in various sections?

Author Message

Massimo Sanna

Tuesday 17 May 2005 5:33:14 am

Hi there, I'm a beginner, and I'm building up my first site from scratch. I followed the building an ez Publish Site tutorial, and I'm really enjoying eZ Publish, but I need a little suggestion about this:
I want to show some content in various areas of the site, but it's not the main content.
For example: on the homepage the main content is an image hotspot, but I would also like to have the latest news on the right. Moreover I don't want to see the left navigation for subsections, since I'm on the root node and it's just a repeat of the top nav.
In some inner pages, I'd like to have some pertinent information below the left navigation, which is not in the main content, but would come from another node, just like on ezPublish website, where the right column changes appearance according to the section. I know I have to play with overrides, but in the tutorial I followed, I just learnt to change appearance for main content, and not for other elements.
Does anybody have a link where I could find what I'm looking for? And what is the best practice to follow for elements which would not appear in the logical tree of the website? To build a folder and put all these elements into?
Thank you in advance,

Max

Marko Žmak

Tuesday 17 May 2005 3:12:17 pm

You can fetch any content from your content tree using template operators. See:

http://www.ez.no/ez_publish/documentation/reference/data_fetching

and also:

http://www.ez.no/ez_publish/documentation/reference/data_fetching/content/list

for fetching data. If you are new, this link could be usefull too:

http://www.ez.no/ez_publish/documentation/reference/template_operators/miscellaneous/attribute

It's a very usefull operator.

The main idea for showing the content on different parts of thepage is to fetch the content you want, and then display it in the part of the page you want. Learning the eZ template language well is recomended. :)

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Massimo Sanna

Tuesday 17 May 2005 11:57:32 pm

But... my problem is not how to actually fetch the data, but how to manage with the various overrides. In the tutorial they teach you how to modify the appearance of the main content. But what if I have to change something that's not the main content? I don't know where to look at...
I found out -in the design section-, that I can create modules which would sit in predefined positions. For some tasks they could be helpful, eg. latest news and so on. But I'm afraid of activating them because I'm sure they would screw up my design :-/
To be sincere nobody talks about modules here around... it looks like the best way to do it is to code it, right?

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 31 2025 08:05:37
Script start
Timing: Jan 31 2025 08:05:37
Module start 'layout'
Timing: Jan 31 2025 08:05:37
Module start 'content'
Timing: Jan 31 2025 08:05:37
Module end 'content'
Timing: Jan 31 2025 08:05:37
Script end

Main resources:

Total runtime0.0426 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.0074 588.2813151.2266
Module start 'layout' 0.00740.0032 739.507836.6797
Module start 'content' 0.01060.0304 776.187594.1875
Module end 'content' 0.04100.0015 870.375033.9922
Script end 0.0426  904.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00286.6308140.0002
Check MTime0.00122.8029140.0001
Mysql Total
Database connection0.00122.738010.0012
Mysqli_queries0.00358.173130.0012
Looping result0.00000.063310.0000
Template Total0.00102.410.0010
Template load0.00081.817110.0008
Template processing0.00030.596210.0003
Override
Cache load0.00051.237210.0005
General
dbfile0.015937.438980.0020
String conversion0.00000.026340.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