2 Questions about Table component #956
Replies: 2 comments 5 replies
-
Hello and welcome to SQLPage ! To make a field a link, use the markdown top-level parameter for the table component and format the data in the select statement as a Markdown link To color every other row, use the -- Display a table with links and alternating row colors
select
'table' AS component,
'User Name' AS markdown, -- Make the 'User Name' column interpret markdown
TRUE AS striped_rows; -- This is the simplest way to get alternating row colors
select
-- Create a markdown link for the user's name
'[' || name || '](user_details.sql?id=' || id || ')' AS "User Name",
email,
created_at
from users; If you really need to control the precise highlight color of rows, you can
But I would recommend sticking to See all the features of the table component here : https://sql-page.com/component.sql?component=table |
Beta Was this translation helpful? Give feedback.
-
Hello, I was testing the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How can one of the fields of data returned in the Postgresql query for the table be made into a link?
What's the best way to make every other row a certain color?
SIDENOTE: I think adding the boolean parameter to the component for the every other color be a nice feature. Would also need to manage that when sorted on column headers.
Beta Was this translation helpful? Give feedback.
All reactions