Forums / Install & configuration / How do you set the number of articles shown

How do you set the number of articles shown

Author Message

Richard Wood

Sunday 05 January 2003 11:39:51 pm

I've looked high and low but can't see how through the admin interface or the templates that you set how many items will display out of the content module.
Anyone, please advise.
Richard.

Jan Borsodi

Monday 06 January 2003 1:05:28 am

> I've looked high and low but can't see how through the admin
> interface or the templates that you set how many items will
> display out of the content module.
> Anyone, please advise.
> Richard.

If you mean children of a content object the number is controlled by the template, for instance open design/standard/templates/node/view/full.tpl and look at the top you should see a line that says page_limit=25, this controls the maxium number of children.

By default the templates will have a constant value(that's the only sensible thing for a generic release), however if you want to you could create a template which reads the children count from the object itself (for instance an integer attribute).
This is done by creating an override template for a specific class.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Richard Wood

Monday 06 January 2003 2:42:16 am

> > I've looked high and low but can't see how through the
> admin
> > interface or the templates that you set how many items
> will
> > display out of the content module.
> > Anyone, please advise.
> > Richard.
>
> If you mean children of a content object the number is
> controlled by the template, for instance open
> design/standard/templates/node/view/full.tpl and look at the
> top you should see a line that says page_limit=25, this
> controls the maxium number of children.
>
> By default the templates will have a constant value(that's
> the only sensible thing for a generic release), however if
> you want to you could create a template which reads the
> children count from the object itself (for instance an
> integer attribute).
> This is done by creating an override template for a specific
> class.

Thank you for your answer.
I apologise for my ignorance here as I am having to work by trial and error a fair bit.
There appears to be a default of eight items being shown in my news view which uses a file pagelayout.tpl for the entire user side of the site, and template line_class_24 and line_class_2 as override templates for particular classes of articles in line view.
I can't find any page_limit=8 in those override templates and wherever else I've found it and changed it has not had the necessary effect.
So I figure 8 is a default setting in ezpublish and I need to add some code to one of my templates to change that to the 15 I want. Which template do I add it to, or am I on the wrong track.
Richard.

Jan Borsodi

Tuesday 07 January 2003 10:34:04 am

> > > I've looked high and low but can't see how through the
> > admin
> > > interface or the templates that you set how many items
> > will
> > > display out of the content module.
> > > Anyone, please advise.
> > > Richard.
> >
> > If you mean children of a content object the number is
> > controlled by the template, for instance open
> > design/standard/templates/node/view/full.tpl and look at
> the
> > top you should see a line that says page_limit=25, this
> > controls the maxium number of children.
> >
> > By default the templates will have a constant
> value(that's
> > the only sensible thing for a generic release), however
> if
> > you want to you could create a template which reads the
> > children count from the object itself (for instance an
> > integer attribute).
> > This is done by creating an override template for a
> specific
> > class.
>
> Thank you for your answer.
> I apologise for my ignorance here as I am having to work by
> trial and error a fair bit.
> There appears to be a default of eight items being shown in
> my news view which uses a file pagelayout.tpl for the entire
> user side of the site, and template line_class_24 and
> line_class_2 as override templates for particular classes of
> articles in line view.
> I can't find any page_limit=8 in those override templates
> and wherever else I've found it and changed it has not had
> the necessary effect.
> So I figure 8 is a default setting in ezpublish and I need
> to add some code to one of my templates to change that to
> the 15 I want. Which template do I add it to, or am I on the
> wrong track.
> Richard.

You pass the limit parameter to the fetch function for content/list, like:
fetch('content','list',hash(....,limit,5))

There's also an offset parameter that can be used.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Richard Wood

Tuesday 07 January 2003 8:25:19 pm

> > > > I've looked high and low but can't see how through
> the
> > > admin
> > > > interface or the templates that you set how many
> items
> > > will
> > > > display out of the content module.
> > > > Anyone, please advise.
> > > > Richard.
> > >
> > > If you mean children of a content object the number is
> > > controlled by the template, for instance open
> > > design/standard/templates/node/view/full.tpl and look
> at
> > the
> > > top you should see a line that says page_limit=25,
> this
> > > controls the maxium number of children.
> > >
> > > By default the templates will have a constant
> > value(that's
> > > the only sensible thing for a generic release),
> however
> > if
> > > you want to you could create a template which reads
> the
> > > children count from the object itself (for instance an
> > > integer attribute).
> > > This is done by creating an override template for a
> > specific
> > > class.
> >
> > Thank you for your answer.
> > I apologise for my ignorance here as I am having to work
> by
> > trial and error a fair bit.
> > There appears to be a default of eight items being shown
> in
> > my news view which uses a file pagelayout.tpl for the
> entire
> > user side of the site, and template line_class_24 and
> > line_class_2 as override templates for particular classes
> of
> > articles in line view.
> > I can't find any page_limit=8 in those override
> templates
> > and wherever else I've found it and changed it has not
> had
> > the necessary effect.
> > So I figure 8 is a default setting in ezpublish and I
> need
> > to add some code to one of my templates to change that
> to
> > the 15 I want. Which template do I add it to, or am I on
> the
> > wrong track.
> > Richard.
>
> You pass the limit parameter to the fetch function for
> content/list, like:
> fetch('content','list',hash(....,limit,5))
>
> There's also an offset parameter that can be used.

I understand that now. My problem is to find which template the fetch command is in that sets the view to eight in the demo.
I have now searched through every template that comes with the demo to no avail.
As I understand it the full_class_x tempates are the individual article views, the line_class_x are the individual line views.
Where is the template in the demo that does that fetch and then loops through and produces the line views - that will be the one I want.
If I need to create an override, then what do I call it and where do I put it?

eZ debug

Timing: Jan 18 2025 02:01:51
Script start
Timing: Jan 18 2025 02:01:51
Module start 'content'
Timing: Jan 18 2025 02:01:52
Module end 'content'
Timing: Jan 18 2025 02:01:52
Script end

Main resources:

Total runtime1.2473 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.3906180.8047
Module start 'content' 0.00621.0610 770.1953594.8594
Module end 'content' 1.06720.1800 1,365.0547345.3438
Script end 1.2472  1,710.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.3964210.0002
Check MTime0.00160.1307210.0001
Mysql Total
Database connection0.00070.053610.0007
Mysqli_queries1.122189.96632000.0056
Looping result0.00230.18301980.0000
Template Total1.219197.720.6095
Template load0.00240.189620.0012
Template processing1.216697.543420.6083
Template load and register function0.00020.013210.0002
states
state_id_array0.00070.052410.0007
state_identifier_array0.00150.119320.0007
Override
Cache load0.00240.19151600.0000
Sytem overhead
Fetch class attribute can translate value0.00220.177030.0007
Fetch class attribute name0.00160.132160.0003
XML
Image XML parsing0.00120.093430.0004
class_abstraction
Instantiating content class attribute0.00000.002270.0000
General
dbfile0.01751.4028280.0006
String conversion0.00000.000430.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs