-
AuthorPosts
-
January 16, 2013 at 11:03 am #184047
Hi!
Is there any way to make K2 item on frontpage to open an external link without opening the article? I would like to link some items directly to websites.
Thanks.
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
January 18, 2013 at 6:52 am #480279Hi Hmaas,
You should use a plugin and can search on JED as http://extensions.joomla.org/search?q=redirect+link
Regards
January 23, 2013 at 12:59 pm #480918Thanks HeR0. I tried two plugins, but they don’t work as I hoped. It’s possible to redirect a link in an article, but not directly without opening the article. So you have to click twice anyway.
I think it has to do with wall.js, on click loads an item, there’s no alternative to open an external link. Since I don’t know js, I won’t touch that.
Any other ideas? It does not seem too difficult to open a link to a website, but there is no place for that. I also tried adding an extra field for website link, but that breaks the site, and would not redirect directly anyway.
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
January 24, 2013 at 7:32 am #480986Hi Hmaas,
Unfortunately, that feature need my more time for customize k2 extra fields and category item layout and item layout. If you open file category_item.php , you will see structure:
<div class="item-image">
<a class="item-link" href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" />
</a>
</div>
So that, you need define a extra field as External Link and replace item link ( $this->item->link) by it .
Hope this can help you customize as you desired.Regards
January 30, 2013 at 9:46 am #481668Hi HeR0,
tried that but I can’t get it working. Adding an extra field breaks the layout completely. I guess we will have to settle to normal links. Thanks anyway. 🙂
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by HeR0 11 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum