- Posts: 3
Postings
You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).
Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!
Open RSS links in same page target="_self"
- albatrozdigital
-
Topic Author
- New Member
-
Less
More
IP: 85.245.181.158
8 years 6 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
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
- syw
-
- Administrator
-
Less
More
- Posts: 829
IP: 24.185.113.161
8 years 6 months ago #4995
by syw
Olivier.
Replied by syw on topic Open RSS links in same page target="_self"
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.
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.
- albatrozdigital
-
Topic Author
- New Member
-
Less
More
- Posts: 3
IP: 109.49.24.68
8 years 6 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
Thanks for the tip, i will try to do that.
And will look forward for that option.
Thanks
Nuno Leite
- syw
-
- Administrator
-
Less
More
- Posts: 829
IP: 24.185.113.161
8 years 6 months ago #4997
by syw
Olivier.
Replied by syw on topic Open RSS links in same page target="_self"
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.
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.
- albatrozdigital
-
Topic Author
- New Member
-
Less
More
- Posts: 3
IP: 109.49.24.68
8 years 6 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
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
- syw
-
- Administrator
-
Less
More
- Posts: 829
IP: 24.185.113.161
8 years 6 months ago #4999
by syw
Olivier.
Replied by syw on topic Open RSS links in same page target="_self"
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.
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.
