Questions about folder listing: pageinfo and default article

Author Message

Alexandre Cunha

Monday 18 August 2003 3:56:12 am

Hi,

Last weekend, using the examples provided by the default ezP3.1 instalation, i created a small site using the Content Classes: folders, articles and pageinfo. I setup bilingual content too with links to switch between the two languages (content and interface). Great !

I have 2 questions about folder listing.

1 - When a link to a folder, i can get the articles list. Each articles uses the template (i use the default template with some changes) line_article.tpl to show header and intro for that article. Using the same aproach, i created a line_infopage.tpl and created the entry:
[line_infopage]
Source=node/view/line.tpl
MatchFile=line_infopage.tpl
Subdir=templates
Match[class]=10
on the override.ini.append file (10 is the number of content class pageinfo)
Unfortunately i dont get the expected result and dont see the result of line_pageinfo.tpl. What im missing ?

2 - I want create a default content article or pageinfo each time i choose a list content folder. Instead of articles list, I want display the complete content of the most recent article (or pageinfo) published and then the articles list using the line_article.tpl.

Can someonte give ideas how to reach these results ??

Thank you,

axel

http://AlexandreCunha.com

Sander Jansen

Monday 18 August 2003 11:50:21 am

1: the attributes in the infopage class are not the same as in the article class. Info page doesn't have an intro attribute for example, which means nothing will show up when you duplicate the article override for infopage.

2: I wanted that too and finally found a solution. When a user attempts to browse a folder the latest article in it is shown instead. How I accomplished this? I made an override for node/view/full.tpl matching the folder class, inside the template there is a fetch function with limit 1 that shows the latest article (using node_view_gui view=full)
Under there you could print a list with the other articles using another fetch function. Read more about fetching here: http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/data_fetch

Alexandre Cunha

Tuesday 19 August 2003 2:07:33 pm

Thank you Sander, your answer is very helpfull.

1 - Your answer for my question 2, lightened me about the solution for the question 1. The problem is not in the line_infopage.tpl but in the folder.tpl (this is a override full.tpl for the class 1 - folder listing). Edited folder.tpl and find:
class_filter_array, array( 1, 10 )
10 is the class id for infopage. I change to:
class_filter_array, array( 1, 11 )
and the problem is solved.

2 - Ok, you find the solution! I have the way to fetch limit 1. Trying to show the article using the article.tpl ...

thanks

axel

http://AlexandreCunha.com

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 16:25:39
Script start
Timing: Jan 18 2025 16:25:39
Module start 'layout'
Timing: Jan 18 2025 16:25:39
Module start 'content'
Timing: Jan 18 2025 16:25:39
Module end 'content'
Timing: Jan 18 2025 16:25:39
Script end

Main resources:

Total runtime0.0146 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.1719152.6563
Module start 'layout' 0.00590.0019 740.828139.5078
Module start 'content' 0.00780.0047 780.335989.2891
Module end 'content' 0.01250.0021 869.625034.3047
Script end 0.0145  903.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002617.5744140.0002
Check MTime0.00128.0449140.0001
Mysql Total
Database connection0.00128.339210.0012
Mysqli_queries0.001711.365830.0006
Looping result0.00000.094810.0000
Template Total0.001611.210.0016
Template load0.00085.562710.0008
Template processing0.00075.041110.0007
Override
Cache load0.00064.012610.0006
General
dbfile0.00032.146980.0000
String conversion0.00000.040940.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