-
Hello, How do I use the icons provided by SQLPage in my Markdown links? I tried that, but it's not elegant : SELECT
'table' AS component,
'action' AS markdown,
'Listes des serveurs' AS description,
TRUE AS sort,
TRUE AS small,
TRUE AS striped_rows,
TRUE AS search;
SELECT
*,
'[![](./icons/edit.svg "Édition")](formulaire_serveur.sql?serveur_id='|| id || ')' AS action,
'[![](./icons/trash.svg "Suppression")](suppression_serveur.sql?serveur_id='|| id || ')' AS action
FROM serveurs; |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello ! |
Beta Was this translation helpful? Give feedback.
-
Hi, Here is an example how you can get them working in the current version: select
'table' as component,
'Edit' as icon,
'Edit' as markdown
...
'[![Edit](edit.svg)](/wanted_link.sql)' f you want to travel example some data id from the row with you: '[![Edit](edit.svg)](/wanted_link.sql?id=' || wanted.WantedID || ')' wanted is table from your database and WantedID is column from your database. In this case edit.svg is downloaded from tabler.io to local storage, if I don't remeber wrong, it works just by pointing somehow the link to the svg file in tabler.io. There is little problems in some components tabler.io icon integration working straight forward and in others it doesn't. In here maybe the markdown syntax causes issues as it isn't the native language of SQLpage and because of that, it cannot get the right icon by just putting the name of icon. |
Beta Was this translation helpful? Give feedback.
Hello !
Adding built-in edit, view and delete links would indeed be useful, and has been asked before, I'll think about how best to do it in a future version of sqlpage.
In the meantime, you are doing it right: a markdown image link is the best way to integrate clickable icons in a table at the moment. SQLPage uses tabler for all built-in icons, you can download them from https://tabler.io/icons