Forums / Setup & design / Questions about folder listing: pageinfo and default article

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

eZ debug

Timing: Jan 30 2025 21:42:29
Script start
Timing: Jan 30 2025 21:42:29
Module start 'content'
Timing: Jan 30 2025 21:42:29
Module end 'content'
Timing: Jan 30 2025 21:42:29
Script end

Main resources:

Total runtime0.2780 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.1875370.2578
Module start 'content' 0.00640.0138 958.44531,001.5156
Module end 'content' 0.02020.2576 1,959.96093,891.5859
Script end 0.2779  5,851.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00461.6576200.0002
Check MTime0.00130.4587200.0001
Mysql Total
Database connection0.00060.220510.0006
Mysqli_queries0.180164.79141410.0013
Looping result0.00150.52881390.0000
Template Total0.257292.510.2572
Template load0.00080.278410.0008
Template processing0.256492.242010.2564
Override
Cache load0.00050.187110.0005
Sytem overhead
Fetch class attribute can translate value0.00190.667110.0019
XML
Image XML parsing0.00030.097910.0003
General
dbfile0.00792.8270200.0004
String conversion0.00000.001830.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.0001 secs