Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • hmaas Friend
    #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 Friend
    #480279

    Hi Hmaas,

    You should use a plugin and can search on JED as http://extensions.joomla.org/search?q=redirect+link

    Regards

    hmaas Friend
    #480918

    Thanks 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 Friend
    #480986

    Hi 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

    hmaas Friend
    #481668

    Hi 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. 🙂

    HeR0 Friend
    #481816

    Hi Hmaas,

    Sorry man, thats all i could do for now.

    Regards

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 2 voices, and was last updated by  HeR0 11 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum