You are not logged in.
Pages: 1
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
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
Thanks, but how do I create the title attribute in the link when there is an image in the anchor, instead of text?
Offline
"!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
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
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
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
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
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
Pages: 1