Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-04-14 15:34:27

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

[SOLVED] <txp:site_url /> doesn't work ... !?

Normally this should work, yes? > <img src="<txp:site_url />design/icon.svg"> … it doesn’t. This instead <img src="../design/icon.svg"> does work. Am I wrong?

Textpattern 4.8.8
PHP 8.1.x

Last edited by RedFox (2023-04-14 15:43:10)

Offline

#2 2023-04-14 16:55:30

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,002
Website GitHub Mastodon Twitter

Re: [SOLVED] <txp:site_url /> doesn't work ... !?

Have you tried using <txp:site_url /> on the page you are using to check if it works by itself?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2023-04-14 17:22:29

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [SOLVED] <txp:site_url /> doesn't work ... !?

colak wrote #335302:

Have you tried using <txp:site_url /> on the page you are using to check if it works by itself?

Yes, it does > “https://opwoestegronden.nl/test/”

Offline

#4 2023-04-14 17:31:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,208
Website GitHub

Re: [SOLVED] <txp:site_url /> doesn't work ... !?

Are you using the tag in a template or article? If it’s an article you’ll need to escape textile as it’ll mangle the tag.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2023-04-14 18:51:20

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [SOLVED] <txp:site_url /> doesn't work ... !?

Eh … how do I do that? It’s in an article, by the way.

* <img class="facebook" src="<txp:site_url />design/facebook.svg" alt=""> <txp::link_out url="https://www.facebook.com/opwoestegronden/" text="Facebook" title="Naar Facebook" />
* <img class="instagram" src="<txp:site_url />design/instagram.svg" alt=""> <txp::link_out url="https://www.instagram.com/op.woeste.gronden/" text="Instagram" title="Naar Instagram" />
* <img class="linkedin" src="<txp:site_url />design/linkedin.svg" alt=""> <txp::link_out url="https://www.tinyurl.com/2cwl6vmm" text="LinkedIn" title="Naar LinkedIn" />

Last edited by RedFox (2023-04-14 18:52:50)

Offline

#6 2023-04-14 18:54:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,208
Website GitHub

Re: [SOLVED] <txp:site_url /> doesn't work ... !?

Add notextile. before the tag.

Or try surrounding the entire thing with a pair of double equals signs:

* ==<img class="facebook" src="<txp:site_url />design/facebook.svg" alt=""> <txp::link_out url="https://www.facebook.com/opwoestegronden/" text="Facebook" title="Naar Facebook" />==

Not sure how well those will work given it’s in a bullet list.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2023-04-14 19:02:28

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: [SOLVED] <txp:site_url /> doesn't work ... !?

Bloke wrote #335306:

Not sure how well those will work given it’s in a bullet list.

Thanks … it == does work with the bullet list … :)

Last edited by RedFox (2023-04-14 19:03:01)

Offline

Board footer

Powered by FluxBB