Keyword

How create link to latest item of a category

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • New Member
More
2 months 1 week ago #168668 by Slartibartfast
Slartibartfast created the topic: How create link to latest item of a category
Hi, is there a way to make a custom link to the latest article of a category?
Like a permanent button in a position that always links to the latest item page (so it is not a link to a certain article)

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #168676 by Fotis
Fotis replied the topic: How create link to latest item of a category
You could add a K2 Content module with just 1 item to show, selected from all categories. And choose to only display the item's title. It'll end up like a menu item, so then it's a matter of some CSS to actually make it look so.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • New Member
More
2 months 5 days ago #168715 by Slartibartfast
Slartibartfast replied the topic: How create link to latest item of a category
That's a good idea! i ll give it a try and come back to report.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 3 weeks ago #168872 by Fotis
Fotis replied the topic: How create link to latest item of a category
Let us know how it goes :)

And hey, if you like K2, why not take a moment to add your review and rate it at the Joomla Extensions Directory? extensions.joomla.org/extension/k2/ (it means a lot to us)


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • New Member
More
1 month 2 weeks ago #168920 by Slartibartfast
Slartibartfast replied the topic: How create link to latest item of a category
ok so this definitely did it! i got it to the point where i am showing it as a side menu item exactly like my normal menu items. Only thing i couldn't manage yet is give it the "active" menu style when it is clicked. (and with this one i guess this topic goes to "solved")
unless anyone has a quick solution, i may manage this myself actually. See i could n't find much time yet, since i am struggling with this problem that is haunting my nights...! (trying to show an icon in the menu when an article is written TODAY)
really sorry for posting it here as a link. i need all the help i can get. if it breaks forums rules do say so and i will delete it.
Nevertheless if a solution is found i would need to implement this as well to my K2 Content module.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 month 2 weeks ago #168923 by Fotis
Fotis replied the topic: How create link to latest item of a category
Again, JS is your friend here. You can grab the current page URL and compared it to the URL of each item link. If they match, apply a CSS class to make it "active". You can of course do this server side, but it's much easier this way as you won't have to deal with the Joomla API (which breaks every 6 months).


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • New Member
More
1 month 2 weeks ago #168926 by Slartibartfast
Slartibartfast replied the topic: How create link to latest item of a category
ok got that. i will return with results, i hope...!

thank you once more for your help Fotis

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

Moderators: william white