Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-22 03:12:09

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Both <summary> and <content> in Atom feed

Hi,

How can I include both <summary>Except</summary> and <content>Full text</content> in the Atom 1.0 feed? The spesification allows for both to be pressent in an <entry>, but Textpattern does not (it appears).

Edit: Preferably like this:

<title type="text">Plain text title</title>
<summary type="html">Except with &lt;em&gt;entity escaped&lt;/em&gt; tags.</summary>
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Full and <em>rich</em> content!</div></content>

Note the type change is refelcting how “advanced” the content is. The summaries from my site might contain som formatting. The main content will probably contain much, and rich formatting. It is also spesified for the intended media. All readers display title, some the summary, and some more advanced the entire content. This way all readers will be able to display something.

Last edited by Aleksandersen (2007-04-22 04:01:32)

Offline

#2 2007-04-23 02:38:14

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Both <summary> and <content> in Atom feed

Go to your admin prefs and make sure Syndicate article excerpt (default is article body)? is set to Off.

The preference is not phrased very well. I’ll see about changing it to something more accurate.

Last edited by Mary (2007-04-23 02:38:39)

Offline

#3 2007-04-23 19:05:22

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Re: Both <summary> and <content> in Atom feed

Will this preference include both a summary, and the entire article? :/ Who knew… Thanks. :)

Is it possible to specify the text types for each tag as well?

There really should be a feed administrative preference panel somewhere. To add add additional tags, edit, and customise the feeds… Feed are very important to most news/blogs sites! Both RSS 2, and Atom 1 contains a lot of optional tags (such as icon, image, ttl, ..) that many publishers would find useful.

Offline

#4 2007-04-23 23:53:06

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Both <summary> and <content> in Atom feed

Is it possible to specify the text types for each tag as well?

No, there isn’t (short of hacking files). You shouldn’t need to change them, though. ?

Offline

#5 2007-04-24 09:19:42

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Re: Both <summary> and <content> in Atom feed

The summary and content is fine with the tex type, but the title should be text.

Offline

#6 2007-04-25 02:29:12

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Both <summary> and <content> in Atom feed

I don’t think text is a valid type for the title, since it might contain HTML entities.


Alex

Offline

#7 2007-04-25 15:30:55

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Re: Both <summary> and <content> in Atom feed

The title should not contain HTML entities, and it should not be formatted as HTML. The reason why it is preferred to be type=“text” is because then it is ensured that every Atom enabled application can read at least a part of the feed…

Offline

#8 2007-04-26 03:34:06

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Both <summary> and <content> in Atom feed

The title should not contain HTML entities…

Why not?

Titles are Textiled, so these:

I'm Happy
1912 - 1990

become these:

I&#8217;m Happy
1920 &#8211; 1990

Offline

#9 2007-04-26 06:44:00

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Both <summary> and <content> in Atom feed

Mary wrote:

Titles are Textiled

This is news to me. Are you sure about that?

Offline

#10 2007-04-27 01:07:44

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Both <summary> and <content> in Atom feed

The title should not contain HTML entities, and it should not be formatted as HTML.

..says who? I believe it’s legit according to the spec, and an accurate reflection of the contents of Textpattern article titles. If there’s a good reason to change it I’m happy to investigate, but converting titles to plain text can’t necessarily be done reliably.

Last edited by zem (2007-04-27 01:11:14)


Alex

Offline

#11 2007-04-27 04:58:03

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Both <summary> and <content> in Atom feed

Pardon – it is run through Textile, but for a different purpose. Forgot about that.

Offline

#12 2007-04-27 09:04:57

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Re: Both <summary> and <content> in Atom feed

It’s for backwards compability with Atom 0.3 enabled readers.

Offline

Board footer

Powered by FluxBB