Reuse modular content in a different layout?


I want to use the content of _menulist on another page and with a different layout

footer/_menulist uses template/modular/menus.html.twig

and I want
home/_features with template/modular/menus-features.html.twig ( a layout similar to quark features)

If I create a page home/_features and enable twig I can access the content of _menulist in the same layout of the footer

{% if page.find(’/footer/_menulist’).published == ‘true’ %}
{{ page.find(’/footer/_menulist’).content }}
{% endif %}

the Million dollar question,

Can I change the layout to menus-features?
and if yes what is the best practice or is my logic way off?
I don’t want to be duplicating content.

Thanks for the insights!!!

Here’s where I’m at…

modular footer

/footer modular

In the footer I have a menu list


The _menulist is created with a custom modular page called menus

The menu template is located template/modular/menus.html.twig and contains this

{% set menu_title =  %}
{% if %}<h3>{{ menu_title }}</h3>{% endif %}
{% for menu_items in page.header.menu_items %}
{% if menu_items.url %}<a href="{{ menu_items.url }}">{% endif %}
<i class="fa fa-fw {{ menu_items.icon }}"></i>
{% if menu_items.taxonomy and == 'yes' %}
{{ menu_items.taxonomy }}
{% else %}
{{ menu_items.text }}
{% endif %}
{% if menu_items.url %}</a>{% endif %}
{% if menu_items.description and menu_items.desc == 'yes'%}
{{ menu_items.description }}
{% endif %}
{% endfor %}

with blueprints/modular/menus.yaml

title: Menus
'@extends': default

          type: tab
          title: Menus
              name: menu
              type: text
              label: Menu Name

              name: menu_items
              type: list
              label: Menu Items

                  type: iconpicker
                  label: Icon
                  type: text
                  label: Text
                  type: text
                  label: Taxonomy
                  type: text
                  label: Use Taxonomy (yes or no)
                  default: no
                  type: text
                  label: Link
                  description: Use full https url for exterior links
                  type: textarea
                  label: Description of link
                  type: text
                  label: Show the above description (yes or no)
                  default: no
                  type: text
                  label: Is this an affiliate link (yes or no)
                  default: no
                  type: text
                  label: Hide This (yes or no)
                  default: no

Works as I need by placing this in the footer.html

{% if page.find('/footer/_filing-paper').published == 'true' %}
<div class="column {{ columns }} twf">
{{ page.find('/footer/_menulist').content }}
{% endif %}

**this is my menus-features.html.twig **

{% set menu_title = %}
{% if %}

{{ menu_title }}

{% endif %}
{% set grid_size = theme_var(‘grid-size’) %}
{% set columns = page.header.class == ‘small’ ? ‘col-4 col-md-6 col-sm-6’ : ‘col-4 col-md-6 col-sm-6’ %}
{{ content|raw }}
{% for menu_items in page.header.menu_items %}
{% endfor %}

Is it just me... or is anyone else challenged with menu creation?