Forums / Setup & design / dynamic content from more than one location

dynamic content from more than one location

Author Message

Ole Kristian Klevstrand

Wednesday 18 February 2004 3:32:42 pm

Hi!

I have gone through the "Building an eZ publish site" documentation, and I am very confused. The example uses $module_result.content to put dynamic content into the pagelayout.tpl template.But what if I want to display content from two (or more) different nodes?

Thanks,

Ole Kristian

Björn Dieding@xrow.de

Thursday 19 February 2004 12:04:11 am

Impossible... because

content/view/full/node_id

has only one node as parameter

If you want to archive this for some reason your are looking into a lot of work

the result is the content in $module_result.content

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Anne A

Thursday 19 February 2004 12:50:12 am

How is it possible to get several sections with dymaic content on a page?

Paul Forsyth

Thursday 19 February 2004 1:07:51 am

You can display content from other nodes if you want to. Simply fetch a node by id and display its data_map as you wish.

Paul

Ole Kristian Klevstrand

Friday 20 February 2004 1:41:21 am

Paul, I seem to be missing something basic here...can you give an example? I want to have one table (main content) with the latest five articles from the folder "myfrontpage" with subject and introduction, and one table with a list of the latest 10 subjects from the folder "news". Both "sections" should be displayed on the frontpage.

If I don't use $module_result.content, how do I link to the main content of my choice?

- Ole Kristian

Paul Forsyth

Friday 20 February 2004 2:04:53 am

You should always use $module_result.content on your main pagelayout. This pulls in the content from the location the user is currently viewing.

Instead what you need to do is modify the template for the content object that produces the code for $module_result.content. Remember, this is what each folder, article, etc does.

Take a look at this documentation page:

http://ez.no/ez_publish/documentation/building_an_ez_publish_site/the_news_page/overview_of_the_latest_news

and at the code halfway down. The fetch statement pulls in articles from a location and the loop underneath displays each using node_view_gui. If you have a different location for your new you would replace the $node.node_id with the appropriate value.

btw, in theory it is possible to code *everything* in the main pagelayout, but the template override system allows the developer to create many more types of sites.

Hope this helps

Paul

Ole Kristian Klevstrand

Sunday 22 February 2004 5:42:35 am

Thanks, think I got it now. :)

- Ole Kristian

eZ debug

Timing: Jan 31 2025 05:59:05
Script start
Timing: Jan 31 2025 05:59:05
Module start 'content'
Timing: Jan 31 2025 05:59:05
Module end 'content'
Timing: Jan 31 2025 05:59:06
Script end

Main resources:

Total runtime0.2948 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0154 588.0625180.8125
Module start 'content' 0.01540.0255 768.875097.8359
Module end 'content' 0.04080.2539 866.7109526.0000
Script end 0.2947  1,392.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.2450200.0002
Check MTime0.00140.4805200.0001
Mysql Total
Database connection0.00080.286010.0008
Mysqli_queries0.178060.37621410.0013
Looping result0.00150.50721390.0000
Template Total0.253586.010.2535
Template load0.00080.273410.0008
Template processing0.252785.719010.2527
Override
Cache load0.00060.187610.0006
Sytem overhead
Fetch class attribute can translate value0.00100.339510.0010
XML
Image XML parsing0.00030.085210.0003
General
dbfile0.063821.6416200.0032
String conversion0.00000.002730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs