Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-05-17 22:38:54

woof
Member
Registered: 2004-08-01
Posts: 128

txp:permlink and txp:site_url tags on https:// pages

I notice that if call a txp page using https the permlink and site_url tags will output their links as https — is there any way to force them to output as http in a https page? Thanks

Offline

#2 2010-05-20 20:13:38

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: txp:permlink and txp:site_url tags on https:// pages

You may need to provide the absolute URL for these links that need to switch back to http from https. So use <a href="http://url.com/123342">link</a>.

I think that the permlink and site_url tags use the current protocol in the browser whether it’s http or https and then the site url provide under admin>preferences appended to it. I don’t know if you can change the site url under admin>preferences to include http://. Depending on the predominate protocol you could hard code the links for one and not the other. I may be way off on this but that’s where I’d look.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#3 2010-05-20 22:24:24

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: txp:permlink and txp:site_url tags on https:// pages

I guess rah_replace would work:

<txp:rah_replace from="https" to="http"><txp:permlink><txp:title /></txp:permlink></txp:rah_replace>

Offline

#4 2010-05-21 01:41:02

woof
Member
Registered: 2004-08-01
Posts: 128

Re: txp:permlink and txp:site_url tags on https:// pages

Thanks whaleen and Els. :) In the short term I hard coded everything. The rah_replace solution looks promising though. Appreciated !

Offline

Board footer

Powered by FluxBB