Inject Page in Modular Pages (Custom Theme)

I’m just little confuse about inject-page plugin, when i save in content markdown file.

[content-inject path="/fasilitas-and-pelayanan/layanan-unggulan" /]

i’m save it in modular pages in _akses file.

user/pages/02.beranda/_akses (type: modular/akses)

when i’m debug it its show just like it

#raw_content: "[content-inject path="/fasilitas-and-pelayanan/layanan-unggulan" /]\n"

and not showing in beranda page. and this template twig modular i’m using,

{% extends 'partials/base.html.twig' %}

{% block content %}
    {% for module in page.collection() %}
        {{ module.content|raw}}
    {% endfor %}
{% endblock %}

i just want show content of /fasilitas-and-pelayanan/layanan-unggulan page to /beranda page, but /beranda page is modular template.

please advice some trick.

thanks

@topidesta, Using the ‘One Page’ skeleton plugin Page-Inject works as expected in both content of modular page as well as in content of module.

The post is a bit confusing to me…

  • Do you want to inject the page into the content of module ‘_akses’, or into the content of modular ‘02.beranda’?

  • when i’m debug it its show just like it

    • How did you “debug”?
    • Where is #raw_content: being displayed?
  • and not showing in beranda page

    • Again, do you want to inject the page into the content of module ‘_akses’, or into the content of modular ‘02.beranda’?

Please clarify…

Thanks for your response.

  • Do you want to inject the page into the content of module ‘_akses’, or into the content of modular ‘02.beranda’?

yes. but when i’m try with

[plugin:page-inject](/fasilitas-and-pelayanan/layanan-unggulan)

it’s not show an content, but just a Link . it’s about template/ system.yaml setting?

So to the question “This or that?” your answer is “Yes”? :smiley:

@topidesta, You probably already know that programming/coding is about specificity and accuracy. The same holds for asking questions and answering questions.

May I therefor suggest you take a little bit more time creating a post and also answering posts? If you want to go fast, go slow

  • You didn’t answer my questions.
  • You are mixing page-inject and content-inject in posts which are totally different beasts.
  • You are mixing Markdown style and Shortcode style.
    See the plugin’s docs about requirements when using Shortcode style.
  • [plugin:page-inject](/fasilitas-and-pelayanan/layanan-unggulan)
    it’s not show an content, but just a Link

    • page-inject doesn’t inject content, but injects an entire page instead
    • What does the Link look like? I cannot imagine plugin PageInject creates a <a> link/anchor.
1 Like