|
New user to SQLPage and have a small application that is working well and very happy with it. I have run into an issue with trying to enhance a table column with a markdown link. After many attempts, decided to just create a basic page and I have replicated my problem. The hard coded entry at the bottom of the code displays the desired link and text. Selecting from my sample database table displays the desired markup as text. I must be missing something very simple. I'm using SQLPage v0.28 |
Answered by
lovasoa
Sep 24, 2024
Replies: 2 comments 11 replies
|
Hi! if the link text is the url itself, then you don't need any special syntax. URLs are automatically made clickable when rendering markdown: SELECT 'table' AS component,
'Links:' AS title,
'Link' AS markdown,
TRUE AS sort,
TRUE AS search;
SELECT description AS Description, url AS Link
FROM my_urls |
4 replies
|
@rklump I had the same issue. Finally url_encode worked for me. SELECT description AS Description,
CONCAT(
'['
, url
, ']('
, sqlpage.url_encode(url)
, ')'
) AS Link
FROM myurls; |
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



@rklump : I found where the problem comes from.
The reason
So, when you execute
SELECT 'x' as Link, postgres returns{ "link": "x" }(lowercase) instead of{ "Link": "x" }(capitalized)Reference:
The fix
Use double quotes around
Linkinas Link:SQLPage improvements ?
This is difficult to fix directly inside sqlpage, since it…