I’ve run into a problem. I have a floated quote (or a pull quote, as it’s also being called) at the end of a text block (many paragraphs). For the text to wrap around it properly, the quote has to be located in the DOM at least few paragraphs before the text ends.
Using separate field for the whole text and for the quote, I would like to accomplish it (of course).
So, is there anyway to insert the blockquote in the middle of the text from the other field? I don’t want to split the text into two parts (two fields) in the panel and just echo first part, then the quote, and then the second part. It’s awkward and the website is meant to be somewhat edited by a client. So having to manually split the content into two and also chosing how to split it is not an option in this case.
Maybe if I could somehow count the number of paragraphs to be echo’ed, then echo only part of them, insert blockquote and echo the rest of the text. But it’s just an idea and I’ve not found anything that would allow this.
I would of course be very grateful for any help. Greetings.
You could by targeting the quotes by element. Of course that only works if there is only one style of quote per text block. Just wanted to leave this here for reference.
Sorry, I guess my wording was not really precise. What I meant to say was that you can’t apply a class to markdown blockquotes to style them differently. With a kirbytag, however, you can.
One text field should be enough for that. If you need to have different directions / positions for the blockquotes you could also do something like this.
Yes, it was also my initial idea. I was just wondering whether there is a way to use Kirby engine to do it in a more elegant way (elegant for the client, since doing it this CSS way is elegant too, of course). This is somewhat not playing well with BEM approach, but that’s a minor problem.