What/Where is list.links set? Ref: JModellist::getPagination() line 178

33 views
Skip to first unread message

Mathew Lenning

unread,
Jun 10, 2013, 10:57:09 PM6/10/13
to joomla-...@googlegroups.com
Hey everyone!

So I'm trying to reinvent the wheel (Joomla legacy MVC) where in all the depreciated code is gone, functions have one responsibility, nested conditionals are non-existent, all of my the privates are protected and responsibility for finding and loading classes/names/etc.. can be injected. I'm half way done with the POC, but while implementing the public getPagination() function I noticed that the list.limit having list.links subtracted from it, before sending it to the pagination constructor. I search all of the Legacy MVC classes and the JPagnination class, but couldn't fine where list.links was set to the state. 

If you know what this is for please let me know. For the time being I'm just going to leave it out and send the limit as is, but since the unknown is often the cause of many hours of WTF debugging, any help would be appreciated. 

Take care
Sincerely,
Mathew

Mark Dexter

unread,
Jun 10, 2013, 11:14:31 PM6/10/13
to joomla-...@googlegroups.com
A quick search for "list.links" yields the following:

cms-trunk/components/com_content/models/category.php (3 matches)
181: $this->setState('list.links', $params->get('num_links'));
232: $model->setState('list.links', $this->getState('list.links'));
featured.php
51: $this->setState('list.links', $params->get('num_links'));
libraries/legacy/model/list.php
177: $limit = (int) $this->getState('list.limit') - (int)
$this->getState('list.links');

This is used for the core blog layouts. We get the num_links param for
the menu item and use it to set the number of links to list at the
bottom of the blog. Hope that helps. Mark
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! CMS Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to joomla-dev-cm...@googlegroups.com.
> To post to this group, send an email to joomla-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Mathew Lenning

unread,
Jun 11, 2013, 3:05:39 AM6/11/13
to joomla-...@googlegroups.com
Dear Mark,

Thanks for the help! How did you do the search? I did a search in Eclipse, but it only turned up the getPagination() in JModellist.

Mark Dexter

unread,
Jun 11, 2013, 9:16:53 AM6/11/13
to joomla-...@googlegroups.com
I used Eclipse->Search->File->File Search->Containing Text
"list.links"->File name patterns: *.php. Mark

Mathew Lenning

unread,
Jun 12, 2013, 6:53:04 AM6/12/13
to joomla-...@googlegroups.com
That's what I did too. It might be time to upgrade my pdt.

Again thanks for the help!

Reply all
Reply to author
Forward
0 new messages