Forum Discussion

octavian_krody's avatar
3 years ago

How to retrieve node quilt template, not all settings return proper values.

During the page initialization script I'd like to be able to read the grouphub quilt configured for the node

I'm using

coreNode.settings.name.get("form.ApplyQuilt.field.quilt.grouphubpage", "my-default-value")

and it always returns my-default-value while

coreNode.settings.name.get("layout.announcements", "my-default-value")

returns as expected configured value.

Any ideas how I can access said setting?

  • The setting name is just "quilt.GroupHubPage" (not 100% if it's case-sensitive). If you get that setting it should work. 

  • MattV's avatar
    MattV
    Khoros Staff

    The setting name is just "quilt.GroupHubPage" (not 100% if it's case-sensitive). If you get that setting it should work. 

  • MattV 

    Thank you!
    It seems that "quilt.grouphubpage" did the trick (case sensitive!)

    Although there is an inconsistency in the key we should be using.
    The site is reporting a different key when Studio > text editor > advanced > show keys is enabled

    Is this a bug?

  • MattV's avatar
    MattV
    Khoros Staff

    It's not a bug, but perhaps the documentation could use some clarification.

    The text key will help you derive the name of the config; also inspecting the input element's ID or NAME attribute will also help you derive the name of the config.

    Our settings are almost always just something.somethingelse, the word before the dot is the setting group, and after the dot is the setting name.