template - fetch question

Author Message

ANCA GROZEA

Wednesday 12 November 2008 5:38:18 am

Hello,

I am still a beginner so sorry that my question is not too complicated. It is for me but I am sure it is just a basic thing for most of this forum users.

I have a Web Interface instalation and would like to create a portlet where to have a list with the titles + date of the last updated content in my site.

1. which is the template I have to update with the fetch function?
2. I will try to write the fetch myself but if you have an example that could help too :)

Thank you!
Anca

ANCA GROZEA

Friday 14 November 2008 2:50:12 am

Any idea is welcome....

thanks!
Anca

Ɓukasz Serwatka

Friday 14 November 2008 3:28:05 am

Hi,

The quickest will be to create a portlet view template then access it like: www.example.com/content/view/portlet/2 where 2 is node_id

portlet.tpl place in design/<name>/templates/node/view/portlet.tpl then in template use "list" or "tree" fetch function to get data you need and display it.

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/list

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/tree

If you want to display in somewhere else, then fetch functions are your friend.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

ANCA GROZEA

Friday 14 November 2008 7:18:08 am

Thank you very much. I will give it a try!

Have a nice day!
Anca

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 18 2025 15:52:22
Script start
Timing: Jan 18 2025 15:52:22
Module start 'layout'
Timing: Jan 18 2025 15:52:22
Module start 'content'
Timing: Jan 18 2025 15:52:23
Module end 'content'
Timing: Jan 18 2025 15:52:23
Script end

Main resources:

Total runtime0.6665 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9063152.6250
Module start 'layout' 0.00540.0025 740.531339.4453
Module start 'content' 0.00790.6571 779.9766547.2344
Module end 'content' 0.66500.0015 1,327.210912.1641
Script end 0.6665  1,339.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4659160.0002
Check MTime0.00140.2027160.0001
Mysql Total
Database connection0.00080.122710.0008
Mysqli_queries0.616592.5067600.0103
Looping result0.00060.0919580.0000
Template Total0.636495.520.3182
Template load0.00200.306720.0010
Template processing0.634395.177420.3172
Template load and register function0.00020.027810.0002
states
state_id_array0.00140.206610.0014
state_identifier_array0.00190.283620.0009
Override
Cache load0.00170.2553260.0001
Sytem overhead
Fetch class attribute can translate value0.00050.076120.0003
Fetch class attribute name0.00110.163250.0002
XML
Image XML parsing0.00070.105320.0004
class_abstraction
Instantiating content class attribute0.00000.001550.0000
General
dbfile0.00080.1177180.0000
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs