Nov 25 2023 08:43 AM
Hello.
In my SharePoint page, I use a list as menu (So I can have a different menu, depends on which page I have.
So, on this list, I have (for now) only two columns: Title and hyperlink. Title is invisible so on my page, I see only the alternative texts that act as menu items (Tell me if there is a better way)
I found the way using JSON to have my font size a bit bigger and have same color as regular links. However, these links don't change colors when used as would do a normal hyperlink.
Is it possible to have that ?
Thank you for your help
Nov 26 2023 03:00 AM
@Asuryan32 Use JSON like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField.desc",
"attributes": {
"href": "@currentField",
"title": "@currentField.desc",
"target": "_blank"
},
"style": {
"text-decoration": "none",
"font-size": "16px"
}
}
Output:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Nov 26 2023 06:38 AM
Hello.
Thank you for your answer. It's working well, except for the colors.
Is it possible to have the colors (Visited/not visited) automatically match the look form the pages ? For example, my site is set on "Orbit". Unvisited links are similar to light green and visited one like pink fuchsia)
If not, maybe it's possible to manually give the colors ?