Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: seadhna on July 15, 2013, 23:31:21

Title: Is it possible to show more than 20 short articles on a category page 1?
Post by: seadhna on July 15, 2013, 23:31:21
Hi there, I have 21 articles within a category. It's a shame to have pagination just for one extra article - is there any way to increase beyond 20 the number of short articles which are displayed on a category front end?
Title: Re: Is it possible to show more than 20 short articles on a category page 1?
Post by: speck on July 18, 2013, 10:14:27
for do this i think u needs put hand to php code.
if the articles are showed in front-end, u can use superarticle module, open his file xml identify the variable nitems and add the option values.
example:
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
etc ....

</select>

for internal pages you can create an autonomus page, create a link in the menu and match it at the module. is not a good solution but sometimes is usefull. (elxis flexibility)
Title: Re: Is it possible to show more than 20 short articles on a category page 1?
Post by: datahell on July 18, 2013, 23:57:54
No, you don't have top edit php files for that.

The number of articles is controlled by the component's parameters in XML files.

See component content's XML files:
Code: [Select]
components/com_content/content.xml
components/com_content/content.category.xml

Check the parameters related to short articles, e.g.:

Code: [Select]
<param type="list" name="ctg_short_num" default="-1" label="SHORT_ARTICLES_NUMBER" dir="rtl" description="NUMBER_ITEMS_PER_PAGE">
<option value="-1">GLOBAL_SETTING</option>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
</param>

Add more options bellow (21, 22, 23, ...). Then edit that category from within Elxis administration and you will see that you will be able to select a bigger value for that field.
Title: Re: Is it possible to show more than 20 short articles on a category page 1?
Post by: seadhna on July 25, 2013, 22:48:33
Thanks very much for the response. I followed both actions. I added the extra lines in content.category.xml. This gave me the additional options in the category parameters. However, even though I could choose other options, only 20 were still displayed per page. However, when I did the second action: change last="20" to last="30" in the short_articles param type in content.xml - this allowed me to change the global setting to 30 and then when I changed the specific category parameter to 'global setting' there are now more than 20 short articles displayed. Thanks!