Keyword

How to display list of items from category?

  • Rastislav Klc
  • Rastislav Klc's Avatar Topic Author
  • Offline
  • New Member
More
14 years 9 months ago #78650 by Rastislav Klc
How to display list of items from category? was created by Rastislav Klc
HI, here is my question about items and categories.(using Joomla 1.5.15 + K2 2.2)
I have multiple items in certain category. In item's template, I would like to access links + names to all the items from its category, where this item belongs - trying to get list of peer items via parent category. As of now I am able only to use next and previous links using eg. $this->item->previousLink and $this->item->previousTitle.
Most likely I can hack K2 file /components/com_k2/views/item/view.html.php which would however break my future compatibility with K2. I am not going to do that.So my ultimate questions are:Can I access parent's category object from items template?How to iterate all the items from category?How can I access parent category of given category?
FYI: it is used to display all the hotels within certain spa resort. Each hotel (item) also contains list of all hotels in the same spa resort - so you can quickly jump among hotels (it is usually 2 to 8 hotels). As of now I bypassed this issue with 3-rd level split menu.Thanks

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


Powered by Kunena Forum