Insert CMS field into middle of a paragraph?

Is it possible to insert a variable on a Collection Tempalte like e.g. you have

“This is the text and page from XYZ and its good.”

Can I replace XYZ with a database entry like a name or something?

I dont think so? Because i can only select the whole text string to be replaced, right?

I might to have to have three elements, first half of the sentence, the XYZ part, the last part as separate elements, right? And it wont be easy to replace a string within a call-to-action like
e.g. “About XYZ” ?

Regards
Daniel

p.s. i am soooo hyped but also overwhelmed by the cms, that I m not up to date to all possibilities :stuck_out_tongue_winking_eye:

2 Likes

I was wondering the same thing. it’s something we use with Business Catalyst web apps… so you can generate similar pages of content with custom variables within the paragraphs.

1 Like

We wanted to support this functionality at launch but couldn’t get to it due to some complexity. In essence it’s like adding a span around a part of the text (in a paragraph for example) and having that text come from the database. We don’t have support for that yet.

For now you’ll have to add a div, add 3 text blocks and float them all or make them all display: inline, and bind the middle one to a text field so it pulls from the database.

1 Like

Hey @thesergie, would love to know exactly how to achieve the workaround to this you’ve mentioned.

Thanks!

Couldn’t you do a dynamic embed with a P tag? I just tried it and it worked.

What to do:

  1. Place the embed widget on a dynamic page or inside of a dynamic list.
  2. Type your desired content. “This is my XYZ dynamic example.”
  3. Highlight XYZ and select add field in the upper right corner and pick your modifier.
  4. Save & Close
  5. Give your embed a class and stylize it to what you wish.
10 Likes

Nice worrrrrrrrk! Good thinking