Dotclear

Vous n'êtes pas identifié(e).

Annonce

13 février 2024 Sortie de Dotclear 2.29

#1 2012-03-06 02:49:20

clearingthedots
Membre
Inscription : 2010-06-09

rss feed

How can I force the "read more" link on a rss feed to open in a new page?


The problem I have is as follows:

I have a website that uses a rss parser to display the rss feed from my blog. When someone clicks on the "read..." link that follows the entry's excerpt, it will open my entire blog inside the little rss parser box. I would like for the link to open my blog on a new page (_blank).

Thanks

Hors ligne

#2 2012-04-10 18:52:55

goudie
Membre
Lieu : Montréal, QC
Inscription : 2006-02-19
Site Web

Re : rss feed

Hi !

You can try this code inside the <description> tag, in the "rss.xml" file that you copy from "/inc/public/default-templates" to the "tpl" folder of your theme before edit  :

<![CDATA[ 
<a href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_xml="1"}}">Read more...</a>
]]>

Dernière modification par goudie (2012-04-12 14:35:06)

Hors ligne

#3 2012-05-21 01:40:12

clearingthedots
Membre
Inscription : 2010-06-09

Re : rss feed

Thanks for the reply. I need some additional clarification...

The rss.xml file for the theme I use has the following line:

<description>{{tpl:EntryExcerpt absolute_urls="1" encode_xml="1"}}
    {{tpl:EntryContent absolute_urls="1" encode_xml="1"}}</description>

Are you saying I should add

<![CDATA[
<a href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_xml="1"}}">Read more...</a>
]]>

to this line so it becomes:

<description>{{tpl:EntryExcerpt absolute_urls="1" encode_xml="1"}}
    {{tpl:EntryContent absolute_urls="1" encode_xml="1"}}
<![CDATA[ <a href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_xml="1"}}">Read more...</a>
]]></description>

?

Thanks

Hors ligne

#4 2012-05-21 16:41:12

goudie
Membre
Lieu : Montréal, QC
Inscription : 2006-02-19
Site Web

Re : rss feed

yes exactly, you can try this :)

Hors ligne

#5 2012-06-04 01:50:37

clearingthedots
Membre
Inscription : 2010-06-09

Re : rss feed

Hi,

I gave this a try, but it did not work.

I have been studying the code in the atom and rss files, and cannot figure out where or how the "read (title)..." link that shows up after an entry's excerpt is generated.

Anyone knows?

Hors ligne

Vous n'êtes pas identifié(e).

Pied de page des forums

Sites map