- Posts: 14
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Get All Category Items on Item Page to Make Item Page Look Like Category Page
Get All Category Items on Item Page to Make Item Page Look Like Category Page
- Jereme
-
Topic Author
- Offline
- New Member
Less
More
13 years 9 months ago #99206
by Jereme
Get All Category Items on Item Page to Make Item Page Look Like Category Page was created by Jereme
I am trying to make the an Item page (item.php) look just like a Category page (category.php). So what I need to figure out is how to access the category items on the item page.
Assume the following - I have a category called animals. The animals category has 4 items in it (cat, dog, horse, mouse).
When on the Animals category page (category.php) all of the items (cat, dog, horse, mouse) are listed. Now when you click on an item it takes you to the item page (item.php). I want this item page to look just like the category page.
So from the item.php page I need to get access to the parent category (Animals) which I can using $this->item->category. Then I need to get all of the items from the Animals category. Then I loop through the items and list them out just like on the category page.
Or is there an easier / better why to make an item page look like a category page?
Assume the following - I have a category called animals. The animals category has 4 items in it (cat, dog, horse, mouse).
When on the Animals category page (category.php) all of the items (cat, dog, horse, mouse) are listed. Now when you click on an item it takes you to the item page (item.php). I want this item page to look just like the category page.
So from the item.php page I need to get access to the parent category (Animals) which I can using $this->item->category. Then I need to get all of the items from the Animals category. Then I loop through the items and list them out just like on the category page.
Or is there an easier / better why to make an item page look like a category page?
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
-
- Offline
- Platinum Member
- Aham Brahmasmi
13 years 9 months ago #99207
by Kannan Naidu Venugopal
K2 Rocks \m/
Replied by Kannan Naidu Venugopal on topic Get All Category Items on Item Page to Make Item Page Look Like Category Page
Hi Jereme,
Isn't that like having a category page with all the item parameters set to show ? Hide the read more and title link. Don't link it to the item page. When click on the Animal category, you have everything but minus the comments of course :D
Isn't that like having a category page with all the item parameters set to show ? Hide the read more and title link. Don't link it to the item page. When click on the Animal category, you have everything but minus the comments of course :D
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- Jereme
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 14
13 years 9 months ago #99208
by Jereme
Replied by Jereme on topic Get All Category Items on Item Page to Make Item Page Look Like Category Page
I have the category page setup the way I need. It has a title - "Animals" and description. Then it lists the titles of the items (cat, dog, horse, mouse). Now when I click on an item link say cat I want the cat item page to look just like the animal category page except the title of the page will be "Cat" and the description be for cat. Then the item page will also list all of the other animal items - cat, dog, horse, mouse.
Does that make sense?
Does that make sense?
Please Log in or Create an account to join the conversation.
- Jereme
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 14
13 years 9 months ago #99209
by Jereme
Replied by Jereme on topic Get All Category Items on Item Page to Make Item Page Look Like Category Page
I ended using the mod_k2_content module. I setup an instance of the mod_k2_content and selected the category I was working with. Then I created a custom mod_k2_content template to display the listing of items the way I wanted. This instance of the mod_k2_content module was then shown on the desired category and child items.
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Get All Category Items on Item Page to Make Item Page Look Like Category Page