Treat livetable data in column as link to webpage url

I have a livetable with a URL collumn which has a short string datatype where full url adresses to (non wiki) webpages are stored.

I’d like the livetable to treat the data as a url so that when the user clicks on the field that webpage opens

I tried using columnproperty “auto” but this opens the 'data’page holding the variable.

#set ($columnsProperties = {
  'doc.title': {"displayName":"Title","link":"view"},
  'URL': {"link" : "auto"}

when using the property value the same happens.

'URL': {"link":"URL"},

How do I use the short text data values as a url in the livetable?

Hi, if you check the type at https://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable%20Macro#HAllacceptedvalues-2 you’ll see that we currently don’t have a URL type.

One thing that comes to mind to achieve your need would be to have a custom JSON and set a doc_URL_url property in it with the value being the URL.

Another idea would be to return a HTML link (<a href=.../>) and tell the LT that the content is HTML ({'html':true}).

I’m not an expert on this though.

Yet another idea would be to check if LiveData provide a solution to this since LT are getting deprecated and are replaced by LD now. See https://extensions.xwiki.org/xwiki/bin/view/Extension/Live%20Data%20Macro/.

1 Like

Great as always vincent,

I wasn’t aware of the LiveData macro, The livetable i’m looking at is part of the default Appwithin minutes ‘overview’ page.

I checked Jira and see that there’s a request to handle the deprecation Loading... (+1) - I suspect that the urlproperty in LT will work for this, so I’ll get cracking!

thank you once more!