Headline parameters with graphic selection

Hi guys. I hope you are all well. I am just wondering if this is possible. I have a headline that i have exported as a component and i have added some parameter code as i want my users to be able to change the title, add a url (this will be used for a link to files) and also i want them to be able to choose the graphic too. I have attached a screenshot of my json and screen. The json i have only lets them change the text for the graphic but it doesnt do anything and it would be nice for them to use the icon chooser. Hopefully this makes sense.

Hopefully there is a way.

Thanks all

Chris

Hello Chris,

Thanks for writing in! Apply the JSON parameters to the Headline element. You will need to set the Headline fields using the JSON parameter. For example;
image

image

image

Kindly let us know how it goes.

Hey @ruenel. How did you manage to add the json to the icon? I only get the option to choose an icon and not add code.

image

thanks

Chris

Hey Chris,

That’s called the Breakout Mode (press CTRL+ALT+B in your keyboard). See it in action from the video below:

Thanks both that has done the trick. I dont suppose its possible than rather the user having to know and type in the icons code whether its possible like in the builder to change it so they can just click and choose the icon? If not do you have a list of the icon codes anywhere that i could get my hands on? Thanks again :slight_smile:

Hello Chris,

You do not need to type the icons. Just update your JSON and use the Icon parameter type:

{
  "label" : {
    "label"       : "Label",
    "type"        : "text",
    "initial"     : "Learn More"
  },
  "href" : {
    "label"       : "URL",
    "type"        : "text",
    "initial"     : "#",
    "placeholder" : "e.g. https://example.com"
  },
  "graphic_icon" : {
    "type"    : "fa-icon",
    "label"   : "Icon Class",
    "initial" : "file-pdf-o",
    "placeholder" : "e.g. file-pdf-o"
  }
}

Cheers.

@ruenel You are a legend. That has worked!! Thank you so much for your help. Just picking your brains here but i have added this as a component for my clients to add it to a page and basically link to policies on their website for people to view. There are lots of plugins for document management but they all download the files when you click on them as opposed to just opening the file up in a web browser to view like this does which is more convenient. Is this the best way to set this up for clients do you think or is there anything else you would recommend? Thanks again for your help as always :slight_smile:

You are most welcome, Chris.
Would you mind providing the URL to the page where we can find the PDF link? There was once a thread that used a 3rd-party plugin to display the PDF in a modal element.

Thanks @ruenel. The link is: https://lindleyjuniors.heritagemat.uk/information/policies-and-public-documents/

Hello Chris,

You can enable the “New Tab” option so that it can force the browser to open the PDF.
image

Kindly let us know how it goes.

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