Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
site_url and page_url ... how do I add them together correctly?
If I use <txp:site_url /><txp:page_url />
I get > <link rel="amphtml" href="https://mercury.postlight.com/amp?url=http://www.misterdutch.nl/new//new/blog/het-vorige-inburgeringsexamen-was-een-beetje-een-slap-examen">
… :(
If I use http://www.misterdutch.nl<txp:page_url />
I get > <link rel="amphtml" href="https://mercury.postlight.com/amp?url=http://www.misterdutch.nl/new/blog/het-vorige-inburgeringsexamen-was-een-beetje-een-slap-examen">
… :)
Can I tweak <txp:site_url /><txp:page_url />
in such a way so I can get a correct output?
BTW … I’m investigating > Postlight Mecury (With one line of code, Postlight Mercury readies your publication for Google AMP) … and it looks promising.
Last edited by RedFox (2016-06-17 13:49:16)
Offline
Re: site_url and page_url ... how do I add them together correctly?
RedFox wrote #299804:
Can I tweak
<txp:site_url /><txp:page_url />
in such a way so I can get a correct output?
That isn’t an individual article page, correct? Why not just use:
<link rel="amphtml" href="https://mercury.postlight.com/amp?url=<txp:permlink />">
Offline
Re: site_url and page_url ... how do I add them together correctly?
michaelkpate wrote #299810:
That isn’t an individual article page, correct? Why not just use:
<link rel="amphtml" href="https://mercury.postlight.com/amp?url=<txp:permlink />">
It has to work on all pages … individual and landing. txp_permlink gives an error on the landing page … not on the individual page.
Offline
Re: site_url and page_url ... how do I add them together correctly?
From https://github.com/textpattern/textpattern-default-theme/blob/master/src/pages/archive.txp
<!-- specify canonical and author -->
<txp:if_individual_article>
<link rel="canonical" href="<txp:permlink />">
<txp:meta_author title="1" />
<txp:else />
<link rel="canonical" href="<txp:section url="1" />">
</txp:if_individual_article>
Offline
Re: site_url and page_url ... how do I add them together correctly?
Thanks Michael … also for the link … :)
Offline