2009-08-01 10:51:00

buzz27
New Member
alpha

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

 

2009-08-01 10:59:37

jstubbs
Moderator
omega
Real name: Jonathan
From: Hong Kong
Known languages: en-gb, es-es, fr-fr
Website

Re: 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/


TXP Tips | @txptips | Me | @jonathanstubbs | Github

TXP Builders – finely-crafted code, design and txp @txpbuilders

Offline

 

2009-08-02 11:25:54

buzz27
New Member
alpha

Re: 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

 

2009-08-02 12:38:52

jsoo
Developer
omega
Real name: Jeff Soo
From: NC, USA
Known languages: English
Website

Re: 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.


Txp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.

Offline

 

2009-08-02 14:05:13

buzz27
New Member
alpha

Re: 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

 

2009-08-02 14:29:35

keith
Member
êta
Real name: Keith Reeder
From: Blyth, Northumberland, England
Website

Re: 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

 

2009-08-02 14:31:17

jsoo
Developer
omega
Real name: Jeff Soo
From: NC, USA
Known languages: English
Website

Re: 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.


Txp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.

Offline

 

2012-07-15 14:59:25

quicknquiet
Member
beta
Real name: Alexander Sobakin
From: Moscow
Known languages: Russian, English, Polish

Re: 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

 

2012-07-15 15:10:22

Els
Admin
omega
Real name: Els Lepelaars
From: The Netherlands
Known languages: nl, en, (some: de, fr, es, it)
Website

Re: link title

Have a look at Example 3 in the tag reference.


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

 

Powered by FluxBB