Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
flat.url bug or feature?
I’m trying the following for atom feeds:
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="<txp:feed_link flavor="atom" format="flat.url" label="Atom" section="" category="" />">
The expected output:
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="http://domain.tld/atom/">
The output:
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="<a type="application/atom+xml" title="Atom feed" href="http://domain.tld/atom/">Atom</a>">
When I delete the label tag or add label=""
the output is
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="">
Are these expected behaviours?
I would expect flat.url
to just show the url as it does on css.
I know that I may most probably be missing something so I’m bringing it to the forum.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: flat.url bug or feature?
Looking at the docs to refresh my memory, url
is not a value for the format attribute in the case of <txp:feed_link />
. Source. By extension, I don’t expect flat.url
to work.
I never tried to build a feed link the way you do there, to be honest. Either I use <txp:feed_link />
standalone (examples in the docs page), or build it fully manually, but that was in the past. The way the tag works nowadays is sufficient.
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="<txp:site_url />/atom/">
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: flat.url bug or feature?
I agree with you but building it manually does not allow for a url schema change. It is of course very minor and never occurred to me before either.
I would nevertheless think that the feed would be one of those constructs that flat.url
would be handy.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: flat.url bug or feature?
I assume your main purpose is easy toggling between https://
and http
(not forcing one or the other)? The old trick will still work: simply omitting the URL Scheme in the link
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="//example.tld/atom/">
If the UA is requesting pages with over https://
, the link (feed URL) will resolve to that URL Scheme.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: flat.url bug or feature?
phiw13 wrote #334312:
I assume your main purpose is easy toggling between
https://
andhttp
(not forcing one or the other)? The old trick will still work: simply omitting the URL Scheme in the link
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="//example.tld/atom/">...
If the UA is requesting pages with over
https://
, the link (feed URL) will resolve to that URL Scheme.
That was a typo in the forum:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1