This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi! I need to insert partials anywhere in the post. For example on this page https://fation.club/blog/post/best-cute-summer-dresses-sleeves-2020 in the end of the page Virtual hairstyle frame. I tried to insert <?php include(''page.php) ?> but it doesn't work. Now I insert frame on the page, but in future I will past not only frame and it will repeat on other pages in different places.
from cms markup/partials you use twig partial tag like:
{% partial "partial_name" %}
from controller partials you use:
<?= $this->makePartial('partial_name'); ?>
from php code you use:
$this->makePartial('partial_name') ;
Last updated
yes, I tried this, but it doesn't work from blog>post, I wrote in post {% partial "partial_name" %} and <?= $this->makePartial('partial_name'); ?> but it render in the text {% partial "partial_name" %} and <?= $this->makePartial('partial_name'); ?>
If you mean from the actual post CONTENT, no, it's not possible.
You could try this trick which MIGHT allow you to do this, not sure:
https://octobertricks.com/tricks/render-twig-content-from-a-string
1-7 of 7