[added r218] Subcategories Sublists (items and categories)

More
14 years 7 months ago #6586 by Rehne
A small change in the original code would be certainly helpful to many users of FlexiContent.
This will allow the display of articles or subcategories of a Sub-categorie (as you see in the picture). The normal/existing use is not affected.

Therefore it would be very good to take this in the core files.

In the com_flexicontent/model/category.php
is a function named function getChilds()
The lines of the function in which the following code is
Code:
... $category->subcats = $this->_getsubs( $category->id ); $k = 1 - $k; } return $this->_childs; }

They need to be expanded only slightly as follows
Code:
... $category->subcats = $this->_getsubs( $category->id ); $this->_id = $category->id; $category->items = $this->getData(); $this->_data = null; $k = 1 - $k; } $this->_id = $id; return $this->_childs; }

Others needs/use the change also:
www.flexicontent.org/forum/index ... opic#p6145
Attachments:

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6589 by Rehne
A small change in the original code would be certainly helpful to many users of FlexiContent.
This will allow the display of articles or subcategories of a Sub-categorie (as you see in the picture). The normal/existing use is not affected.

Therefore it would be very good to take this in the core files.

www.flexicontent.org/forum/index ... =viewtopic

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6595 by kenmcd
.
Hi Rehne,

Added this change to the SVN at r218
code.google.com/p/flexicontent/source/detail?r=218

Please check it to make sure that I made the changes exactly as you specified.

Thanks!

Ken

.

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6605 by flowman
Here is the full code i made for it. So it loads the fields to. If you put that in the svn i will be happy.

Im working on a Flexi pagebreak too that i see ppl in this forum wants.
Code:
function getChilds() { $user = & JFactory::getUser(); $aid = (int) $user->get('aid'); $query = $this->_buildChildsquery(); $this->_childs = $this->_getList($query); // $this->_childs = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit')); $id = $this->id; $this->_data = null; $k = 0; $count = count($this->_childs); for($i = 0; $i < $count; $i++) { $category =& $this->_childs[$i]; $category->assigneditems = $this->_getassigned( $category->id ); $category->subcats = $this->_getsubs( $category->id ); $this->_id = $category->id; $category->items = $this->getData(); $params = $this->_loadCategoryParams($category->id); $category->items = FlexicontentFields::getFields($category->items, 'category', $params); $this->_data = null; $k = 1 - $k; } $this->_id = $id; return $this->_childs; }

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6607 by Rehne
looks good and is a real improvement

Thanks!

If you put that in the svn i will be happy.


Many others also !

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #6611 by flowman
Now when this code is in the svn we should be able to enable or disable it from the category options.

So we add a param to Parameters: layout common, "Subcategory items" show/hide.

Why add this? To limit sql queries for ppl not using this function.

I will post a update here soon.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.787 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline