Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Shortcode for youtube embed and schema
Bloke wrote #330542:
It’s fine as-is. We don’t enforce it in core, besides new installs shipping with it set to utf8-mb4 by default.
Phew, thanks Stef, and that explains the emoji issue too!!
…………………
I <3 txp
…………………
Offline
Re: Shortcode for youtube embed and schema
Hi folks, I have a shortcode query to tack on.. so I have a shortcode calling an img with text from a form so that I can do a two col img/text within an article. For the text, it would be very handy to be able to skip lines within the tag and have those automatically turn into p tags but I’m not sure if it’s possible, when I skip a line at the min in the text variable it does break the tag so it can’t seem to cope with that. If anyone can help thanks so much!
Shortcode:
<txp::img_left mythumb="288" text="These measures make your website more resistant to hacking and/or data sniffing. In this era of GDPR protection these measures help keep your data, and your visitors data safe and secure." />
Form:
<div class="flex-container">
<figure class="flex-item">
<txp:images id="<txp:yield name="mythumb" />">
<img src="<txp:image_url id="<txp:yield name="mythumb" />" thumbnail='1' />" width="<txp:image_info id="<txp:yield name="mythumb" />" type='thumb_w' />" height="<txp:image_info id="<txp:yield name="mythumb" />" type='thumb_h' />" loading="lazy" alt="<txp:image_info id="<txp:yield name="mythumb" />" type='alt' />" title="<txp:image_info id="<txp:yield name="mythumb" />" type='caption' wraptag='' class='' escape='unset' />" class="fade image" /></txp:images>
</figure>
<div class="flex-item"><p><txp:yield name="text" /></p></div>
</div>
…………………
I <3 txp
…………………
Offline
Re: Shortcode for youtube embed and schema
Hi Hilary, not sure to fully understand your question, but you can try to replace
<div class="flex-item"><p><txp:yield name="text" /></p></div>
with
<div class="flex-item"><txp:yield name="text" escape="textile" /></div>
Offline
Re: Shortcode for youtube embed and schema
etc wrote #330661:
Hi Hilary, not sure to fully understand your question, but you can try to replace
<div class="flex-item"><p><txp:yield name="text" /></p></div>...with
<div class="flex-item"><txp:yield name="text" escape="textile" /></div>...
Hi Etc, I did try that but I just skipped lines within the text content in the hope the skipped lines would then translate into p tags by using the escape textile tag, but it just put the code on the page overall without now showing the actual img or text..
…………………
I <3 txp
…………………
Offline
Re: Shortcode for youtube embed and schema
Could it be quotes? This pattern
<txp:image_url id="<txp:yield name="mythumb" />" ...
will not work as you expect, it should be
<txp:image_url id='<txp:yield name="mythumb" />' ...
Offline
Re: Shortcode for youtube embed and schema
etc wrote #330684:
Could it be quotes? This pattern
<txp:image_url id="<txp:yield name="mythumb" />" ......will not work as you expect, it should be
<txp:image_url id='<txp:yield name="mythumb" />' ......
Will test that later thanks so much for all your help with everything!
…………………
I <3 txp
…………………
Offline