Page 1 of 1

Content block with Global Content Block

Posted: Sat Dec 05, 2015 3:41 pm
by howey
Hi

I may be confused, but before v2 of CMSMS I thought you could include a secondary content block within a global content block.

ie

Code: Select all

{global_content name='gcb-title'} could contain {content block="contentname"}
I have tried this within my latest installation and I am not getting the required content block showing in the page content manager.

I have tried putting the global content block before the "process page data" in the template and in the body of the template with no joy.

It just makes life simpler if I can break down complex templates into smaller bite sized templates.

Any suggestions etc would be appreciated. In the meantime I'll go back to long-hand.

TTFN

Re: Content block with Global Content Block

Posted: Sat Dec 05, 2015 6:03 pm
by calguy1000
While: {global_content name='foo'} within a template should not in 2.x detect content blocks (the global_content plugin is not registered for the compiler).

{include file='cms_template:foo'} should work. and should detect content blocks.
However in the upcoming CMSMS 2.1 this doesn't work either. I will investigate.

Still, the recommended way to handle this problem is to use template inheritance, which does work.