Exporting all the items of a category

More
11 years 7 months ago #28617 by jdc18
Hi I need to importa all the items of some categories I created. It doesnt need to have all the info of the items, just the description. I created a view called view.export.php that kind of does that. The problem I am facing is that categories only show 10 items, I was using the view.feed.php as a reference.
Code:
function display( $tpl = null ) { $mainframe =& JFactory::getApplication(); $flexiparams =& JComponentHelper::getParams('com_flexicontent'); $db =& JFactory::getDBO(); $doc = & JFactory::getDocument(); $doc->link = JRoute::_(FlexicontentHelperRoute::getCategoryRoute(JRequest::getVar('cid',null, '', 'int'))); //$doc->link = JRoute::_('index.php?option=com_flexicontent&view=category&cid='.JRequest::getVar('cid',null, '', 'int')); $category = & $this->get('Category'); $params = & $this->get('Params'); //JRequest::setVar('limit', $params->get('feed_limit')); // Force a specific limit, this will be moved to the model JRequest::setVar('limit', 5); //var_dump($params); $params->setValue('limit','23'); //$category->setValue('limit', 5); $rows = & $this->get('Data'); var_dump($rows); echo "asdf"; parent::display($tpl); }
$params->setValue('limit','23'); doesnt work for me, which way should i be able to change the limit

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

More
11 years 7 months ago #28618 by ggppdk
Try:
Code:
<?php $this->setState('limit', 50); ?>


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
11 years 7 months ago #28644 by jdc18
Is that on the view?
Because I get this error if I add that

Call to undefined method FlexicontentViewCategory::setState() in /home/jdc/workspace-juno/ciudad/html/components/com_flexicontent/views/category/view.export.php on line 55

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

More
11 years 7 months ago #28646 by ggppdk
aaa yes on the category model

inside the view.export.php this should work:
Code:
$catmodel = $this->getModel(); $catmodel->setState('limit', 50); $fcitems = $catmodel->getData();


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
11 years 7 months ago #28655 by jdc18
Thanks man, I will buy you a beer someday. Or clean my code and give it back to the project.

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

More
11 years 7 months ago #28657 by ggppdk
I am going out now to drink one and kill some brain cells :D ...


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.297 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