How to use PHP code in Paragraph Tool?

in Foundry 2 I use sometimes PHP-Code in the Paragraph tool.

For example, to have time data created automatically

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. <?php echo strftime ("%d. %B %Y", strtotime("Sunday this week"))?> At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren

Unfortunately, this is no longer possible with Foundry 3 via the Paragraph tool. Which F3 tool can I use for this now?

It looks like the Markdown parser built-in to Stacks, which Paragraph uses, makes the PHP code display as a snippet of visible text instead of allowing the code to execute.

You can use something like the HTML tool instead, which does not use the Stacks Markdown parser.


thank you! the PHP code now works and is running … BUT … now i have the next trouble.

now i am missing the Custom Font Sizing options from the Paragraph-Tool in the HTML-Tool … and Blacksmith cannot help me either.

I know … again very special :see_no_evil: :hear_no_evil: :speak_no_evil:

You would need separate stylesheets for each breakpoint using Blacksmith’s media queries. That is how the paragraph tool does it as well. It is just more steps when you have to do it manually.

1 Like

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