How Do I Generate List of Nested Pages?

This is an advanced shortcode that may not be suitable for everyone. You may need to consult with your developer or utilize Pro plan for adequate support.

Generating nested pages allows you to dynamically generate a list of MPG URLs from another project. A perfect use case would be to generate lists of cities within a state. In the example below, user has had 2 MPG projects:

  • State – MPG project for generating state pages with project ID 18.
  • City – MPG project for generating city pages with project ID 17.

Both projects had a column called “mpg_country” which was used to match the data from both projects for generation of the list.

  • mpg_match is the shortcode that is placed in the template of State page.
  • current-project-id is the parameter indicating ID of the project where the shortcode is inserted, in this case it is ID 18.
  • search-in-project is the parameter indicating ID of the project, which URLs the shortcode has to display. I.e. in this case this is cities template with ID 17.
  • current-header is the shortcode parameter which will be used to compare and match with the MPG project where URLs will be generated from
  • match-with is the shortcode parameter for which header to compare current-header with.

You may now return any data along with static text from the other project between the mpg_match and /mpg_match. This can be any mpg shortcode, you can lists of URLs, create URL tables, or even return images or static data.

[mpg_match current-project-id="18"  search-in-project-id="17"  current-header="mpg_country" match-with="mpg_country"]
      <a href="{{mpg_city}}">City: {{mpg_city}}</a> <br>