Are you enjoying the extensions? Did you like the support? Help others decide

Leave a review

file Open RSS links in same page target="_self"

More
2 years 11 months ago #4994 by albatrozdigital
Open RSS links in same page target="_self" was created by albatrozdigital
Hi!

I'm trying to open rss links in the same page and not having them opened on another window/tab.
So i would like to have a choice to to target="_self".
The reason is because i'm showing rss links from jevents in Latest News Enhanced, and clicking those events i would like tehm to open target="_self" because i'm not leaving my site.

Is that possible?
Or can't be an option to choose what king of target i would like to have? Like this we could change that behaviour.

Thanks
Nuno Leite

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

More
2 years 11 months ago #4995 by syw
Hello Nuno,

you will need to create an override of the Newsfeeds plugin (check simplifyyourweb.com/documentation/latest...s/template-overrides).
In that override, just add $item->linktarget = 0 in the loop <?php foreach ($list as $i => $item) : ?> just before the $extraclasses code.

That should do it. In a later update, I will allow the opening in the same window for special cases like yours.

Olivier.

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

More
2 years 11 months ago #4996 by albatrozdigital
Replied by albatrozdigital on topic Open RSS links in same page target="_self"
Hi!

Thanks for the tip, i will try to do that.

And will look forward for that option.

Thanks
Nuno Leite

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

More
2 years 11 months ago #4997 by syw
You are welcome!
If you have any trouble, please let me know, I can send you a pre-release if you prefer not to have to deal with the code.

Olivier.

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

More
2 years 11 months ago #4998 by albatrozdigital
Replied by albatrozdigital on topic Open RSS links in same page target="_self"
Thanks, it works.
code changed:
<?php foreach ($list as $i => $item) : ?>
<?php
$item->linktarget = 0; // adicionado por nunoleite
$extraclasses = ($i % 2) ? " even" : " odd";

I'll be waiting for the change in the plugin/module, but for now it's working the way i need.

Thanks
Nuno Leite

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

More
2 years 11 months ago #4999 by syw
Perfect!

Once the plugin has been updated, you will be able to remove the override altogether (it is better so you always stay up-to-date).
Then, you will have to make sure you have selected the right link target in Latest News Enhanced Pro.

:-)

Olivier.

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

Free Extensions Support Membership
$12 $9.95
  • 3 months personal help
  • support future developments
  • 30% renewal discount
Sign up now!
Extensions bundle license
$294.50 $99
  • 12 months support (forum & email)
  • 12 months updates
  • all free & pro extensions
  • unlimited sites
  • 30% renewal discount
Get the deal!