Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Creating link and anchor text from 2 fields
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Creating link and anchor text from 2 fields
#50855
Creating link and anchor text from 2 fields 9 Years, 8 Months ago Karma: 0
I have a table which is created by ARI SQL Table, wrapped by ARI JDataTable. I would like to create a link, the anchor text of which is one field, the url another.

The link field is 'Venue', the URL is 'Ticketlink'.

Instead of rendering them as 2 separate columns, I want to output this:

<a href="Ticketlink">Venue</a>

Is this possible?

The test site page this is on is: pfuk.nanagram.co.uk/test2
The administrator has disabled public write access.
 
#50856
Re:Creating link and anchor text from 2 fields 9 Years, 8 Months ago Karma: 748
Hello,

Use the following code between {arisqltable} and {/arisqltable} tags:

Code:


{arisqltablecolumns}
  {arisqltablecolumn id="Ticketlink" hidden="true"}{/arisqltablecolumn}
  {arisqltablecolumn id="Venue"}
    {coltemplate}<a href="{$Ticketlink}">{$Venue}</a>{/coltemplate}
  {/arisqltablecolumn}
{/arisqltablecolumns}



Regards,
ARI Soft
The administrator has disabled public write access.
 
#50857
Re:Creating link and anchor text from 2 fields 9 Years, 8 Months ago Karma: 0
Thanks for your super-fast response. I have done that, but the <a> tag is rendering as text (i.e. <a href="www.adticket.de/Aquanario-Die-neue-Show/Frankfurt.html">Arena</a>) and even with the hidden parameter, the ticketlink column is still showing.

pfuk.nanagram.co.uk/test2

The full code is:

{arijdatatable}
{arisqltable}
{arisqltablecolumns}
{arisqltablecolumn id="date" alias="Date" className="gig_date"}
{arisqltablecolumn id="ticketlink" alias="Tickets" hidden="true"}{/arisqltablecolumn}
{arisqltablecolumn id="venue" alias="Venue" className="gig_venue"}
{coltemplate}<a href="{$ticketlink}">{$venue}</a>{/coltemplate}
{/arisqltablecolumn}
{arisqltablecolumn id="city" alias="City" className="gig_city"}
{arisqltablecolumn id="country" alias="Venue" className="gig_country"}
{/arisqltablecolumns}
{arisqltablequery}
SELECT date, venue, ticketlink, city, country FROM giglist WHERE date >= curdate() ORDER BY date
{/arisqltablequery}
{/arisqltable}
{/arijdatatable}
The administrator has disabled public write access.
 
#50858
Re:Creating link and anchor text from 2 fields 9 Years, 8 Months ago Karma: 748
If you use a WYSIWYG editor, switch it to plain text mode before editing plugin code. If it doesn't help, could you send a temporary access to your J! backebd by email so we can investigate the problem?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#50859
Re:Creating link and anchor text from 2 fields 9 Years, 8 Months ago Karma: 0
Ok, schoolboy error, the code was messed up! That fixed the link, but the hidden column is still showing. I've sent you the admin credentials.
The administrator has disabled public write access.
 
#50860
Re:Creating link and anchor text from 2 fields 9 Years, 8 Months ago Karma: 748
Try now please.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12