Nesting one simple edit file inside another


#1

Matrix Version: 5.4.5.1

I have a global Metadata Schema that I apply to every Content Container Template that I create. They each get their own Simple Edit file for their specific metadata, and then I have to copy in the html to deal with the global metadata. I would like to embed the html for the global fields in some way so that if I make a change to the global schema, I don’t have to go through every Template and update the html in the Simple Edit.

I have attempted to embed this html into a Simple Edit multiple ways, but nothing is working. I have tried

  • a simple edit as nested content
  • a simple edit as a snippet
  • a standard page as nested content
  • a standard page as a snippet
  • a simple edit as %globals_asset_content_raw%
  • a standard page as %globals_asset_content_raw% - this one at least shows the names and descriptions in the html, which are global assets, but does not show the fields.

Is there something I can pass down to it as nested content that will make it work? A different way to write the %metadata-F_% keyword so it gets the field?

If this currently is not possible, I think the simplest solution (from my point of view anyway) would be to allow multiple Simple Edits applied to a Template the way you can have multiple Schemas.

This is a standard page as %globals_asset_content_raw%


(Bart Banda) #2

The only way I think you can do it is to link the content container that you want to be global between the different simple edit layouts.

You might want to put some comments at the top and bottom of that layout to indicate that that’s global code.


#3

I should have thought of that myself! I tried it and it’s working perfectly. Thanks!