- Posts: 12
COMMUNITY FORUM
Module K2 content readmore and title links
- jmeander
-
Topic Author
- Offline
- New Member
Less
More
8 years 4 months ago #159544
by jmeander
Module K2 content readmore and title links was created by jmeander
Greetings,
I have a K2 Content module on the home page of my site set to display the single most recent item in a particular category by one author. All works well except for the fact that the title and readmore links do not open the actual item - they refresh the home page.
I believe that this occurs due to a menu item issue however dynamic links seem to work fine with K2 Tools modules and there is in fact a menu item for the category of this particular module's K2 content, so I'm not sure what to fix.
The link generated is mydomain.com/item/123-itemtitle which just reloads the home page. The actual item is at mydomain.com/menucategoryalias/item/123-itemtitle
Is there a workaround for this and would this be where it'd be implemented in my sub-template:and
I made a totally clueless stab at changing it to echo $this->item->link and that was no help. Don't laugh. ;)
Thanks much.
I have a K2 Content module on the home page of my site set to display the single most recent item in a particular category by one author. All works well except for the fact that the title and readmore links do not open the actual item - they refresh the home page.
I believe that this occurs due to a menu item issue however dynamic links seem to work fine with K2 Tools modules and there is in fact a menu item for the category of this particular module's K2 content, so I'm not sure what to fix.
The link generated is mydomain.com/item/123-itemtitle which just reloads the home page. The actual item is at mydomain.com/menucategoryalias/item/123-itemtitle
Is there a workaround for this and would this be where it'd be implemented in my sub-template:
<a class="moduleItemTitle" href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
<a class="moduleItemReadMore uk-button uk-button-color uk-align-right" href="<?php echo $item->link; ?>">
I made a totally clueless stab at changing it to echo $this->item->link and that was no help. Don't laugh. ;)
Thanks much.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 4 months ago #159555
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Module K2 content readmore and title links
The code is correct $item->link should be used in mod_k2_content's template files.
Can you send me a link to the site?
Can you send me a link to the site?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- jmeander
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 12
8 years 4 months ago - 8 years 4 months ago #159585
by jmeander
Replied by jmeander on topic Module K2 content readmore and title links
Here you go:
Part of the message is hidden for the guests. Please log in or register to see it.
Thanks.
Edit: Arggghhh... I just tested again and it's different behavior but not entirely broken any more. Not sure what I did, I was trying everything. Last night the readmore link most definitely did NOT work however as of now it directs to the category latest items view (I think) rather than the full item URL. It's livable this way, I guess, but what I'm really after is for the readmore and title links to go to the fulltext item itself, so they don't have to do the readmore link yet again.
Part of the message is hidden for the guests. Please log in or register to see it.
Thanks.
Edit: Arggghhh... I just tested again and it's different behavior but not entirely broken any more. Not sure what I did, I was trying everything. Last night the readmore link most definitely did NOT work however as of now it directs to the category latest items view (I think) rather than the full item URL. It's livable this way, I guess, but what I'm really after is for the readmore and title links to go to the fulltext item itself, so they don't have to do the readmore link yet again.
Last edit: 8 years 4 months ago by jmeander.
Please Log in or Create an account to join the conversation.
- jmeander
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 12
8 years 4 months ago #159663
by jmeander
Replied by jmeander on topic Module K2 content readmore and title links
Hello,
It's not working again. Something is quite odd with the item link generation, where the category/sub-category are not being prepended to the /item/ID-alias consistently, for both the user, image and readmore links.
Thanks.
It's not working again. Something is quite odd with the item link generation, where the category/sub-category are not being prepended to the /item/ID-alias consistently, for both the user, image and readmore links.
Thanks.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 4 months ago #159681
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Module K2 content readmore and title links
Can you point me to the module in question?
Can you also try using a different template?
Can you also try using a different template?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.