Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-10 22:26:27

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

correct way to display a link?

[a href=”/about”>About[/a]

I used “[]” instead of “<>” because it kept making it a link instead of code. Sorry.

Offline

#2 2006-01-11 00:07:53

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: correct way to display a link?

Try using <code><a href=”<txp:site_url>about”>About</a></code>. That way you will always have the full URL and it will still be portable.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2006-01-11 00:17:14

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

Re: correct way to display a link?

Not necessarily. It won’t work if you switch to messy URLs, for example.

Navigation links are covered in the FAQ.


Alex

Offline

#4 2006-01-11 00:36:03

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: correct way to display a link?

Well that’s true but that problem would occur anyway with or without the site_url tag. I do think it’s better to have the full URL there though.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2006-01-11 00:49:17

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

Re: correct way to display a link?

My point is, the tags used in the FAQ will work if you change your URL scheme, move to a new location, etc.


Alex

Offline

#6 2006-01-11 01:49:11

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: correct way to display a link?

The thing is, you can’t add class and/or ID to txp:section. So on several (most?) design, when you need to style precisely each of them, you have to code it by hand. And it can’t handle complexe things, like adding more text inside a span.

I have this issue doing template for Thame’s thing. My (wanted) XHTML is something like this:

<code><li>
<a id=“nav-home” href=”/articles”
title=“Articles”>Articles
<span> Some text to display when it’s useful</span></a>
</li></code>

Since you can’t add zillions of attribute to txp:section (and every other tags), a nice feature would be to have an attribute for txp:section that output only the target URI. SO we can insert it wherever and however we need to.

Last edited by Jeremie (2006-01-11 01:51:38)

Offline

Board footer

Powered by FluxBB