Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-01 10:51:00

buzz27
New Member
Registered: 2009-08-01
Posts: 3

[textile] link title

Hi,

What is the correct syntax for creating a link in which an image links to a URL, and the link has a title?

ie:

[code]
<a href=“http://example.com” title=“Foo”><img src=”/image.jpg” alt=“Bar” /></a>
[/code]

I can see how to create a link with an image and alt text, but not how to add the title.

Also, is there a way to add the REL attribute to the link?

Thanks!

Offline

#2 2009-08-01 10:59:37

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [textile] link title

This is an example:

<a rel="external" href="http://news.bbc.co.uk/" title="title here">text here</a>

Or another with pure Textile, but without the rel attribute:

"text(title)":http://news.bbc.co.uk/

Offline

#3 2009-08-02 11:25:54

buzz27
New Member
Registered: 2009-08-01
Posts: 3

Re: [textile] link title

Thanks, but how do I create the title attribute in the link when there is an image in the anchor, instead of text?

Offline

#4 2009-08-02 12:38:52

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [textile] link title

"!img!(title)":url

Or

"!img(title)!(title)":url

if you also want the img tag to have title and alt attributes with that value.


Code is topiary

Offline

#5 2009-08-02 14:05:13

buzz27
New Member
Registered: 2009-08-01
Posts: 3

Re: [textile] link title

Perhaps I am making some mistake, but I can’t get either of those two examples to render using: http://textism.com/tools/textile/index.php

Any suggestions?

Offline

#6 2009-08-02 14:29:35

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: [textile] link title

Are you inputting the examples without quotation marks and with valid image and url sources?

Try this – it definitely works for me:

!http://www.capture-the-moment.co.uk/tp/images/567.jpg (Full frame Shoveller)!:http://www.bbc.co.uk

Last edited by keith (2009-08-02 14:33:42)


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#7 2009-08-02 14:31:17

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [textile] link title

http://textile.thresholdstate.com/ uses a more up-to-date version of Textile. Both my examples work there. More to the point, they work in an actual Txp installation.


Code is topiary

Offline

#8 2012-07-15 14:59:25

quicknquiet
Member
From: Moscow
Registered: 2012-07-02
Posts: 11

Re: [textile] link title

May be I went through documentation badly, but I have no idea how to put TITLE attribute to TXP link tags, for example <txp:permlink />

Offline

#9 2012-07-15 15:10:22

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

Re: [textile] link title

Have a look at Example 3 in the tag reference.

Offline

#10 2018-05-28 15:01:28

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: [textile] link title

Sorry to add to this so late: Can Textile produce rel="external" links today?


A hole turned upside down is a dome, when there’s also gravity.

Offline

#11 2018-05-28 16:55:11

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

Re: [textile] link title

jayrope wrote #312144:

Sorry to add to this so late: Can Textile produce rel="external" links today?

No:(


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

Offline

#12 2018-05-28 22:05:43

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: [textile] link title

You could always run a script to scan the page for non-local links & dynamically add the rel=“external”.

Offline

Board footer

Powered by FluxBB