Difference between revisions of "Changing output format of Website url field"

From JReviews Documentation
Jump to: navigation, search
(Created page with "This is the default output format of the Website url field: <pre><a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a></pre> If you want a custom anchor text, replace the secon...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
If you want to change the output format, edit the field in Fields Manager and you will find it at the bottom of the page under Advanced Options.
 +
 
This is the default output format of the Website url field:
 
This is the default output format of the Website url field:
 
<pre><a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a></pre>
 
<pre><a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a></pre>

Latest revision as of 10:40, 23 August 2011

If you want to change the output format, edit the field in Fields Manager and you will find it at the bottom of the page under Advanced Options.

This is the default output format of the Website url field:

<a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a>


If you want a custom anchor text, replace the second {FIELDTEXT} with your text:

<a href="{FIELDTEXT}" target="_blank">Visit Website</a>

That is useful if the url's will be very long, so a custom anchor text will prevent the url from breaking the layout.


You can also use the value of some other custom field as the anchor text, replace the second {FIELDTEXT} with the name of that other custom field, like this:

<a href="{FIELDTEXT}" target="_blank">{JR_SOMEFIELD}</a>


Or you can use an image as link anchor:

<a href="{FIELDTEXT}" target="_blank"><img src="images/mylink.gif"></a>

The image should go into the Joomla's "images" folder in the root.