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
[SOLVED] No image for {anchor} tag
[SOLVED] No image for {anchor} tag
Last edited by eh on Wed Apr 08, 2009 2:12 pm, edited 1 time in total.
-
- New Member
- Posts: 6
- Joined: Sat Mar 07, 2009 1:07 pm
Re: No image for {anchor} tag
Hello Ernst,
I encountered the same problem. I solved it with the onlyhref parameter.
Hope it works for you!
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>
Last edited by Kellergeier on Sat Mar 07, 2009 1:18 pm, edited 1 time in total.
Re: No image for {anchor} tag
Hello Kellergeier
I'll try it out.
Thanks for your reply anyway!
Ernst
I'll try it out.
Thanks for your reply anyway!
Ernst
Re: No image for {anchor} tag
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.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?
hth,
Alex
Re: [SOLVED] No image for {anchor} tag
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
Thanks for the hint.
Ernst
Re: [SOLVED] No image for {anchor} tag
Using an ID as the anchor works fine. Great!
Tested with Firefox, IE7, Opera and Safari (on windows).
Thanks again.
Ernst
My test page:
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>