Pages - Custom Fields
Page metadata can support nested info, and therefore would be fantastic to have structured data in pages, which would allow clients to easily edit content in a safe CMS based environment without having to go in the visual editor or code, which has caused clients to break layouts in the past, which normally leads us to recommend to clients to not touch pages unless they know what they're doing.
As a solution to this, we have often created Webapps with a single item in for the client to mange. Not only does this clutter up Webapps, but it takes the data out of context, and if not properly maintained, can cause fields to be redundant and not used as the site is updated.
Structure like this would be fantastic: https://gist.github.com/JoshCarterWeb/32ecb3174ca367ac8ba5360293d5997b
It would also be a mega bonus to not have the fields named customfield2. It makes things so much harder.
Log in to comment and vote
Comments11
Matt Walter
Apr 18, 2025
Thanks for your feedback! We have a new update for Alpha:
Updated custom field IDs to underscores instead of hyphens, for easier referencing - {{page.metadata.custom_fields['img-array']}} -> {{page.metadata.custom_fields.img_array}}
Only show 'Values' tab if fields have been added in Structure
Swapped tabs around, so 'Values' shows first
Fixed issue where updating name would make UI re-render
Added a 'Save Structure' button at top of view, rather than it saving on each change. Although perhaps not as nice UX-wise, it resolves a few issues we were finding. If you make structural changes, and don't save them, the 'Values' tab will still be using the old structure.
Unsaved structural changes will be indicated by the tab turning orange (errors will still be red)
Add checks for duplicate field names
Devon Reehl
Apr 22, 2025
Love all these adjustments Matt!
Just for those following around, to output the value of the custom field I’m finding you need to add .value at the end of the tag.
So not this:
{{page.metadata.custom_fields.two_word_field}}
But this works:
{{page.metadata.custom_fields.two_word_field.value}}
Rox Dawson
Nov 5, 2024
We use content area instead of webapps with one item and recommend clients edit the content area which is almost plain text or limited fomatting
Liz Gibbs
Nov 4, 2024
And yes to descriptive field names!
Matt Walter
Apr 11, 2025
This is now available in Alpha for testing! → alpha.siteglide.com
There are 2 new user permissions that you can add to roles:
1. The ability to manage structure of custom fields on Pages
2. The ability to manage values of custom fields on Pages
These are both already applied to the default ‘Admin’ User role.
Then you’ll see a new tab for ‘Custom Fields’ when you edit a Page. Here you control the fields and values for that Page.
This will see a full release very soon (see new ETA date), but we welcome testing a feedback beforehand!
Devon Reehl
Apr 11, 2025
@Matt Walter This is awesome news! Can you tell us how to output the custom field values on the page?
Matt Walter
Apr 11, 2025
Output data with {{page.metadata.custom_fields.test}}
Where ‘test’ is the name of your field.
Helen Eichel
Apr 11, 2025
Hi @Matt Walter
Was able to get the images to display!
I used ‘assign” to do so, is this the best way?
If helpful, this is the code I used, where Slider-Image is the custom field for an image…
{% assign sliderimage = page.metadata.custom_fields["Slider-Image"].value %}
<img src="{{ sliderimage | asset_url }}" />
Also, are custom field names restricted in any way? Like no spaces or strange characters?
Thanks Matt!
Matt Jones
Apr 18, 2025
Yep that looks fine.
Shouldn’t be limits in the names, no. If you find one let us know.
Liz Gibbs
Apr 14, 2025
Very timely!
Have a use case using zapier to send Salesforce an “Interested In” value which depends on which “course page” they are using to submit the form. (using one generic form across all course pages)
Was going to use page name but it has to exactly match what is in Salesforce ‘Interested in” list or the zap will fail. The page names are used for page H1s so quite descriptive.
Looking like this will make it easy for client to manage when they add new courses or change the course name. Fingers crossed!
Tested basics by adding course name to page and that worked.
Once live will do end to end test with SF.
Matt Walter
Apr 23, 2025
This has been released now →
https://docs.siteglide.com/en/cms/pages/about-pages/custom-fields
We’re already working on another improvement for this feature to make data output easier, so keep an eye out for that soon!