Component Builder Headline Parameters

Good day Themeco Team!

Apologies in advance if this is a newbie question. I am trying to learn how to use Components and followed the doc guide and video to create my own button component. I have even been able to get the link target parameter to work as suggested in this post: Feature request: Component parameter checkboxes

All is working well except I would like to know how to dynamically set the icon in the headline element of the button. I have already added the icon parameter and the icon selection is showing when I add the component to the page. What I canā€™t figure out is how to dynamically change the icon based on the icon parameter. I tried something similar to the target choice as per the post above by adding a custom attribute to the headline but I donā€™t think I am getting the name right. I tried ā€˜iconā€™ and ā€˜x-gaphic-primaryā€™ (based on inspecting the page), but these donā€™t work.

Can you tell me the proper name for the custom attribute to dynamically change the headline icon? Or am I going about this all wrong?

One other thing is Iā€™d like to add a parameter to change the size of the text and icon in the headline. Would I just create a text parameter and add the dynamic content to the ā€˜Font Sizeā€™ option entry? Or would I add the dynamic parameter to the ā€˜Weightā€™ option.

Here are the creds for the site https://artistryware.com/:

Not sure if weā€™re talking about the same thing here, but I had some difficulty finding where to place the parameter for an icon in buttons.

After digging around the forum, I found these steps. Maybe they can help you?

  1. Turn on ā€œBreakout Modeā€
    a. From the Cornerstone editor, click the ā€œCornerstoneā€ logo on the top left
    b. Click the settings gear icon on the bottom left
    c. Click the ā€œToolsā€ tab
    d. Set ā€œBreakout Modeā€ to ā€œTrueā€

This should allow you to see and set parameters to nearly any type of element attribute.

  1. Select your element
  2. Locate the ā€œIconā€ field and drop your parameter tag in there.

Screenshot attached for reference.

image

Hi @stilemas,

Thank you so much for the help. That worked!

For setting breakout mode, you missed a step or two. Here it is for others:

  1. Turn on ā€œBreakout Modeā€
    a. From the Cornerstone editor, click the ā€œCornerstoneā€ logo on the top left
    b. Click the settings gear icon on the bottom left
    c. Click the ā€˜Dev Toolkitā€™ checkbox
    d. Click the drill icon in the lower right of the editor
    e. Click the ā€œToolsā€ tab
    f. Set ā€œBreakout Modeā€ to ā€œTrueā€

Once the component has been updated with the parameter, you can turn off breakout mode.

1 Like

Hey @GregoryArndt,

It is good to know that you have resolved your issue already.

@stilemas, Thanks for chiming in!

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.