I am trying to create a view from a post with sections and pages that are clonable. Below you can see the view I am starting to make. You can see here
{% set post = mb.get_post( the_post_id ) %}
the post id is being set via a function in this case its 16. Some fields show properly {{ clone.section_name }}
and {{ clone.page_name }}
work fine. {{ clone.page_name }}
does not work.
If I do not use the short code and just show the page removing
{% set the_post_id = mb.get_pid() %}
{% set post = mb.get_post( the_post_id ) %}
it all works.
Ultimately how can I set the post I want the view to show if I use the shortcode?
Menu
{#
Get the post id
mb.get_pid() is pulling from a function set in snippits
#}
{% set the_post_id = mb.get_pid() %}
{% set post = mb.get_post( the_post_id ) %}
{# Build the menu #}
{% for clone in post.section %}
{{ clone.section_name }}
{% for clone in clone.page %}
{{ clone.page_name }}
{{ clone.post.title }}
{% endfor %}
{% endfor %}