Page 1 of 1
[SOLVED] No image for {anchor} tag
Posted: Fri Jan 23, 2009 7:26 pm
by eh
As compared to the {cms_selflink} tag the {anchor} tag has no attribute to provide an image to display in a page instead of text.
Any idea how to easily extend (or misuse) this tag so it can also be used with an image?
Thanks!
Ernst
Re: No image for {anchor} tag
Posted: Sat Mar 07, 2009 1:14 pm
by Kellergeier
Hello Ernst,
I encountered the same problem. I solved it with the onlyhref parameter.
Code: Select all
<a href="{anchor anchor="pagetop" onlyhref="1"}">
<img src="arrow.gif" alt="Page Up" width="16" height="16" />
</a>
Hope it works for you!
Re: No image for {anchor} tag
Posted: Sat Apr 04, 2009 6:59 pm
by eh
Hello Kellergeier
I'll try it out.
Thanks for your reply anyway!
Ernst
Re: No image for {anchor} tag
Posted: Mon Apr 06, 2009 1:05 pm
by faglork
eh wrote:
As compared to the {cms_selflink} tag the {anchor} tag has no attribute to provide an image to display in a page instead of text.
Any idea how to easily extend (or misuse) this tag so it can also be used with an image?
There is an even simpler way. Since you can reference CSS IDs as well, you just add an ID to the image. This is an option in TinyMCE's "insert/change image" dialogue.
hth,
Alex
Re: [SOLVED] No image for {anchor} tag
Posted: Wed Apr 08, 2009 2:16 pm
by eh
Didn't know that one can reference ID's as the target of a href . This implies that {cms_selflink} will resolve a reference to an ID correctly even the ID might be on another page? Have to try this out.
Thanks for the hint.
Ernst
Re: [SOLVED] No image for {anchor} tag
Posted: Wed Apr 08, 2009 2:31 pm
by eh
Using an ID as the anchor works fine. Great!
Tested with Firefox, IE7, Opera and Safari (on windows).
Thanks again.
Ernst
My test page:
Code: Select all
<p><img id="demoanchor" src="uploads/images/logo1.gif" alt="" width="198" height="52" /></p>
<p> </p>
<p> </p>
...
...
...
<p> </p>
<p> </p>
<p> </p>
<p>{cms_selflink dir="anchor" anchorlink="demoanchor" text="Click here..."}</p>