Keyword

How create link to latest item of a category

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 8 months ago #168668 by Slartibartfast
How create link to latest item of a category was created by Slartibartfast
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.

More
5 years 8 months ago #168676 by JoomlaWorks
Replied by JoomlaWorks on 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.

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

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

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 8 months ago #168715 by Slartibartfast
Replied by Slartibartfast on 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.

More
5 years 7 months ago #168872 by JoomlaWorks
Replied by JoomlaWorks on 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)

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

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

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 7 months ago #168920 by Slartibartfast
Replied by Slartibartfast on 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.

More
5 years 7 months ago #168923 by JoomlaWorks
Replied by JoomlaWorks on 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).

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

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

  • Slartibartfast
  • Slartibartfast's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 7 months ago #168926 by Slartibartfast
Replied by Slartibartfast on 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.


Powered by Kunena Forum