Bill
(Bill)
16 August 2024 23:08
1
I’m trying the link control with this code in properties:
{
"title": "Link:",
"properties": [{
"property": "link",
"title": "Link Text",
"link": {
"subtitle": "Subtitle"
}
}]
}
and I’m trying to get the href using this in template:
Link: {{link.href}}
I don’t see the control in the sidebar or anything in template.
Bill
Stack-Its
tpbradley
(Tom Bradley)
17 August 2024 09:51
2
If you’re not seeing the control in the inspector (or the inspector stops responding to changes) it would suggest a problem processing the properties json. I’m not sure if your sample is the full content or a snippet, but it appears to be missing the top level groups
object.
Changing it to the following should work.
{
"groups": [{
"title": "Link:",
"properties": [{
"property": "link",
"title": "Link Text",
"link": {
"subtitle": "Subtitle"
}
}]
}]
}
Bill
(Bill)
17 August 2024 17:46
3
Yes, I’m just showing the snippet inside of the main properties, but for clarity, here is a total example of my link property code:
{
"groups": [
{
"title" : "Group Name1",
"icon": "textformat.size",
"properties": [
{
"title": "Link:",
"properties": [{
"title": "Link Text",
"property": "link",
"link": {
"subtitle": "Subtitle"
}
}]
}
]
}
]
}
Still control doesn’t show or value in template.
dan
(Dan C.)
17 August 2024 19:00
4
I’ve had a quick look and that code doesn’t seem right, why do you have the extra properties and title in there
I’ve made some changes and it’s now working correctly:
{
"groups": [
{
"title": "Group Name1",
"icon": "textformat.size",
"properties": [
{
"title": "Link Text",
"property": "link",
"link": {
"subtitle": "Subtitle"
}
}
]
}
]
}