I have a snippet where I am using an accordion and want a plain text field above the accordion to be able allow them to set a title (with set formatting). I am only finding the Rich Text option - which would allow them to add whatever they like in there.

Even if I tell them not to apply any styling to this heading - it's still outputting a paragraph tag (which would be relevant for other rich text renderings). I still want to support inline editing on the page - which this does.

enter image description here

Is it possible to strip out the formatting associated to this rich text rendering?

Is there a simpler option that I've missed? I can't use a page content rendering as the title is associated to the specific accordion.

FYI the inline editing looks like this: So ideally I'd like to hide the bold the options displayed so they aren't encouraged to change the styling.

enter image description here


I would not force this functionality with snippet because you would need to adjust how Richtext field editor is behaving.

Best option would be to clone Accordion component and name it "Accordion with Heading". Add Title or Heading field as single line text. Adjust view and model to reflect this and just simply make field editable within Experience Editor.

  • 1
    Was trying to avoid it (just because it requires a lot of tds work in our helix based solution) - but seems like the way to go. Thanks for suggestion! – Jen May 17 at 1:43

Maybe you could use the [Template] (/sitecore/templates/Foundation/Experience Accelerator/Rendering Variants/VariantTemplate)?

Check out http://www.cmsitecore.com/2017/09/design-sitecore-sxa-components-using.html for an example.

  • I'd need a field to pull the title from :) I was trying to avoid cloning the accordion - but looks like that is the way to go. Thanks for the suggestion though. – Jen May 17 at 1:42

To do this you would need to change the field type of the Accordion title to be a Single-line text instead of a Richtext field.

Rather than changing the OOTB component, you should clone the existing Accordion component and then you can change the field type on the new version of your Accordion Item template:

enter image description here

  • Sorry for not being clear - but the title field I'm referring to is for the overall accordion - not each item. Which is why I was using a snippet. So I could combine some kind of text field entry with an accordion below. – Jen May 16 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.