Keyword

If category = 1 item [Direct link to item]

  • Justin Place
  • Justin Place's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 6 months ago #126244 by Justin Place
If category = 1 item [Direct link to item] was created by Justin Place
Hi there,

I have a few k2 categories that only have 1 item,

I feel its a bit of a waste to click on that category and only having one item there,

Is there any way to make it so that

IF Category has 1 ITEM = then it will have a direct link to the k2 item page?

what do you suggest?

thanks

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

  • Franz Wohlkönig
  • Franz Wohlkönig's Avatar
  • Offline
  • Platinum Member
More
10 years 6 months ago #126245 by Franz Wohlkönig
Replied by Franz Wohlkönig on topic Re: If category = 1 item [Direct link to item]
Hy Justin,

why not use a Menu linked on this item?

Regards

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

  • Justin Place
  • Justin Place's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 6 months ago #126246 by Justin Place
Replied by Justin Place on topic Re: If category = 1 item [Direct link to item]
Hi,

My client has a variety of PRODUCTS, therefore i cannot put just that 1 item as a menu link.

i have a category list, a few categories have only 1 k2 Item, i just want that category to be directly linked to its ONE k2 item page. [Because its silly i think for an end-user visitor to click on the category, to then have to click on the only item again]

otherwise ill have to manually display the whole category list, editing each category, which would be very tedious, would be a lot of help if every category that has 1 item can have a link to that item..

maybe an if statement in code? If not i guess ill have some manual work to do .. :(

much appreciated to any suggestions or directions! :)

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

More
10 years 6 months ago #126247 by Lefteris
Replied by Lefteris on topic Re: If category = 1 item [Direct link to item]
@Justin

This is not that easy. You need to write a system plugin that will check the category items and redirect ( or not ). I think the manual way is more easy here. Just make menu links to the items that are single in categories.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Justin Place
  • Justin Place's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 6 months ago #126248 by Justin Place
Replied by Justin Place on topic Re: If category = 1 item [Direct link to item]
hi,

I managed to copy the code display in an article page, then just edit the categories that had one item directly linked to their respective item pages.

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


Powered by Kunena Forum