Forum Discussion

Lindsey's avatar
Lindsey
Leader
6 years ago

List of xml component variables

When adding a component to a quilt xml file, some components contain variables like setting the wrapper, and other things like "hideGranularity", "useChrome", etc. I was wondering if there is a list somewhere that has all the variables you can use for the components? Or do they relate to the individual component itself?

Specifically, I am looking for an option to hide the component when the user is anonymous. I know there is a variable called "hideWhenSignedIn" that some components use, but I need the opposite variable (hideWhenSignedOut or something similar).

  • You can actually see the documented component parameters: When in Community Studio and you hover over a component in the component selector a tooltip will show to the right. With that open move your mouse cursor above it and click anywhere to open the component details:

    There click "Where do I configure this" to see a documentation of parameters:

  • Lindsey,

    Each component has its own attributes, and currently there is no exact documentation available for these attributes.

    But for more help you can see these articles.

    https://community.khoros.com/t5/Pages-and-layouts/About-components/ta-p/134343

    https://community.khoros.com/t5/About-Our-Community/List-of-Khoros-Community-OOTB-and-Custom-components/ta-p/480107

    To hide show components, you can include those components in your custom component and hide them using context objects conditions.

     

    • mattUnicorn's avatar
      mattUnicorn
      Adept

      What about a custom component and attributes? Can I create a component and pass in my own props like:

      <@component id="custom-component" foo="bar" />

       

      • Parshant's avatar
        Parshant
        Boss

        mattUnicorn,

        Yes you can pass the values in parameter in your own custom component.

        <@component id="custom-component" param="bar" />

        and fetch the value of the passed parameter for above statement using below code:

        <#assign paramvalue=env.context.component.getParameter('param') />
        ${paramvalue}