Exclude certain paint layouts from the %asset_contents% keyword


#1

Matrix version 5.4.3.1

Hi all,

Does anyone know of a way to exclude certain paint layouts when using the %asset_contents% keyword?

Basically, we’re pulling content through from a child page and we want to pull through content inside CCT’s and paint layouts, however we don’t want to pull through content that is purely written in the paint layout (otherwise it will duplicate content that is on the parent page).

Thanks.


(Bart Banda) #2

If you use %asset_contents_raw%, it will not use the PL applied to the Standard page, but it will include the PL applied to the Content Containers that are using Content Templates applied. Is that what you want?


#4

Ignore the deleted post above, I replied to the wrong post!


#5

Hi @Bart.

It’s partly what I’m looking for, however I need to allow only certain CCT’s/PL’s to be pulled through.

I need to use a modifier with %asset_contents_raw% to pull through a particular paint layout asset ID.

Thanks.


(Bart Banda) #6

So you want to nest in the Standard Page, but using a specific PL applied to the SP? Or do you want to nest in the Standard Page, without any PL applied to the SP, and different PLs applied to each Content Container inside the SP?

Can you explain a bit more about your use case and what your end goal is?


#7

Hi @Bart, sorry for the late response.

We want to pull through the contents of a child asset, including it’s markup (content along with the div containers with classes etc).

We have a couple of issues here; one problem is it pulls through the content but strips the markup and the other issue is that we don’t want to pull through other paint layouts/container templates.

We’d like to know if there’s a way to pull through a particular paint layout/container template from a child asset.

I hope that makes a little more sense than my previous post?

Thanks.
Dave


#8

So you have a page with multiple containers, and you want to selectively nest one/some of those containers into another page?

You can either use a nest content container and point it to another container (rather than a page) - this won’t work if what you are nesting is using a template.

Or, you can link a container to multiple parent pages. So take the container/s you want and link it to the other page. (Page 1 Container is linked here to Page2)
image

If you can’t do this as you are looking at making something generic to apply in multiple places, a couple of other options to consider:

%globals_asset_contents_paint_XXXX:YYYY% where YYYY is the page you want to nest and XXXX is the paint layout you want to draw it with.

Or, move the content you want to selectively nest to a metadata field, then refer to this in both the owner page and the page you are nesting into.