Using Content Template within Paint Layout


(Greg Roberts) #1

Hi,

Using a Nested div or a keyword I can embed a Content Template within a Paint Layout. However when I view an asset that has the Paint Layout applied, the Content Template doesn’t display - the generated HTML is blank.

If I embed the Content Template directly into the asset eg. Standard Page, it displays perfectly.

Is this an expected behaviour or am I missing something?


(Bart Banda) #2

Content Templates aren’t actually supported on Paint Layouts and we’ve actually disabled that possibility in the next upcoming release to prevent confusion. Turns out this would require a fair bit more work to get working so we have decided to remove the template applying functionality for now until we have time to add support for it.

As an alternative you could try and nest in a Standard Page into the Paint Layout and apply the template to the SP.


(Greg Roberts) #3

Thanks Bart.

I tried the alternative you suggested (nest Content Template -> Standard Page and then nest Standard Page -> Paint Layout) but this had the same result as before (displays blank).

As a workaround I’ve been able to successfully nest the Content Template into a customisable DIV within a Design Customisation but, due to our design, this has presented some further challenges in terms of presentation.

It certainly would be useful to have support for Content Templates within Paint Layouts moving forward.


(Bart Banda) #4

What’s the main reason for using a Content Template within the Paint Layout?
Could you simply just format the layout using the PL itself?


(Greg Roberts) #5

Hi Bart,

Thanks for getting back to me.

I quite like the concept of Content Templates and have been using them to build a few things, like a Google Map Template to embed a map, and a Website Feedback Template to capture user ratings and feedback.

It would just be good to be able to use these freely within the content of a single page, which Content Templates already allow, or across multiple pages / websites by using them within a Paint Layout. Yes, I could just build it out into a Paint Layout but it’s sort of duplication of effort and seems unnecessary when almost all other assets can be embedded within a Paint Layout quite easily. Just my two cents. :slight_smile:


(Bart Banda) #6

Yep, fair enough. Was just wondering if you could potentially share some of the layout between your page PL and your Content Template PL.

In saying that though, the workaround I suggested first, I just tried it in 5.4.0.3 and it works well.

What version of Matrix are you in? Should work for you to. As in:

  • Create PL
  • Nest SP into Type Format of PL
  • On SP, apply your CT to the Content Container
  • The PL applied to the CT appears on the frontend.