Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Can you link a TrackerField type url using plugin List?

posts: 2695 United States

I'm working on an External Link Project
http://jabi.com/Project%3A+External+Links+Using+A+Tracker

Here's the code:

Copy to clipboard
{LIST()} {filter field="tracker_field_showOnThisPage" content=""} ) {OUTPUT(template="table")} {column field="tracker_field_url" label="url" mode="raw" format="objectlink"}} {column field="tracker_field_name" label="Name"} {column field="tracker_field_description" label="Description"} {tablesorter server="n" sortable="type:reset" tsortcolumns="type:text|type:text|type:text" tsfilters="type:text|type:text|type:text" tspaginate="max:10"} {OUTPUT} {LIST}


A nice page to see it in action...
http://jabi.com/Tiki

The problem is the url's are not linked.

Is there a way to actually have it link to the site, rather than just give the url as plain text?

Thanks in advance for any ideas!!!
WizarDave

posts: 22

Hi,

I think you can. In the tracker make sure that under the options for the URL field, the URL is set to "Display as a link".

Your use of the LIST command is a bit different to mine, as you have combined the Output and Format statements on the same line of code, I do not know if this is possible or not. This is what I have done, and I think it gives the result you want, selecting the URL from the list opens the website listed. Instead of "objectlink" for the format I have used "trackerrender".
See below.
My tracker has two fields - url which is a URL field and desc which is a text area.

I hope this helps.

List Code
Copy to clipboard
{LIST()} {filter field="tracker_id" content="33"} {OUTPUT(template="table")} {column field="url" label="WebPage" sort="title" mode="raw"} {column field="desc" label="Description" mode="raw"} {tablesorter server="n" sortable="type:reset" tsortcolumns="type:text|type:text" tsfilters="type:text|type:text" tspaginate="max:10" sortList="[0,0]"} {OUTPUT} {FORMAT(name="url")}{display name="tracker_field_url" format=trackerrender}{FORMAT} {FORMAT(name="desc")}{display name="tracker_field_desc" format=snippet length=500 suffix=...}{FORMAT} {LIST}

posts: 2695 United States

Awesome!
Thank you!!!

Here's the changes I made and my code now works thanks to you.

Copy to clipboard
{LIST()} {filter field="tracker_field_showOnThisPage" content=""} ) {OUTPUT(template="table")} {column field="url" label="url" mode="raw"}} {column field="name" label="Name" mode="raw"} {column field="description" label="Description" mode="raw"} {tablesorter server="n" sortable="type:reset" tsortcolumns="type:text|type:text|type:text" tspaginate="max:10"} {OUTPUT} {FORMAT(name="url")}{display name="tracker_field_url" format=trackerrender}{FORMAT} {FORMAT(name="name")}{display name="tracker_field_name"}{FORMAT} {FORMAT(name="description")}{display name="tracker_field_description" format=snippet length=500 suffix=...}{FORMAT} {LIST}

Upcoming Events

1)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4) 
Tiki birthday
5)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting