Hi,
I am trying to build a component in Joomla where I want an item to be in multiple categories.
Whenever I select ]multiple=multiple in xml form, and Submit the form, catid is set to zero.
<field
name="catid"
multiple="multiple"
type="category">
<option value="0">JOPTION_SELECT_CATEGORY</option>
</field>
How do I achieve that?
Secondly where is code to insert catid values in db.
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_xyz.edit.xyz.data', array());
if (empty($data))
{
$data = $this->getItem();
}
print_r($data);
return $data;
}
Can anyone help me out in this...
Regards
Prashant
I have tried that too.but its not working....
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/MD1Kxy_3do8J.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
Please share your solution here...I need also a multiple categories field in my menu item :-)
On Mon, Sep 3, 2012 at 12:37 PM, Herman Peeren <herman...@gmail.com> wrote:
Sorry, you don't have to rebuild any admin-part for the categories. That stays the same.
I think you only have to change the possibility to choose multiple categories in the item's edit form an then store those multiple category_ids. And of course when displaying the content you'll have to retrieve the list of categories this item belongs to. For the rest I do'n see any changes or problems. You could even still use a category-blog-view exactly as you do with single category items.
So, that doesn't seem to be too difficult.To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/MD1Kxy_3do8J.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.
Please share your solution here...I need also a multiple categories field in my menu item :-)
How could this work with multi languages?
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/KjUeOSOrIpAJ.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/8HyKwoFf3jcJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
On 3 September 2012 20:16, Herman Peeren <herman...@gmail.com> wrote:
Wow, thanks Chris. What a possibilities we have in Joomla!.
I didn't know this. Guess I have to read through those documents: http://docs.joomla.org/index.php?search=smart+search&go=Go&title=Special%3ASearch to know more ab out it.
Herman
On Monday, 3 September 2012 20:58:38 UTC+2, Chris Davenport wrote:I haven't had time to read the whole of this thread, so I might be missing the point, but I'd just like to suggest that you consider using Smart Search for this.
Putting items into multiple categories is really just a form of tagging. So just create a Smart Search plugin for your content type and allow the user to "tag" each item with as many tags as they want. Then you can either set up a (static) filter to filter on those tags or use the regular (dynamic) filters. The tags themselves might have a strict hierarchical structure if you want that (to support the user interface maybe), but Smart Search doesn't need to know about it.
Just a thought.
Chris.
--To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/8HyKwoFf3jcJ.
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.