I'm super stuck... I tried following This Thread which outlined exactly what I'm trying to do; which is allow my editor to select shared regions and place them on the page using blocks.
Here's where I ended up, and I can't get it to work.
- $recognition = perch_content_custom('martech_recognition', [
- 'page' => '*', // need to set the page option to * for shared regions
- 'skip-template' => true, // Don't output using a template
- 'return-html'=>true, // Return only the html data
- PerchSystem::set_var('sharedregion_recognition', $recognition['html']);
- $trusted_by = perch_content_custom('Trusted_by', [
- 'page' => '*',
- 'skip-template' => true,
- PerchSystem::set_var('sharedregion_trusted_by', $trusted_by['html']);
- <?php perch_content('Content - Main'); ?>
Then, when editing the region 'Content - Main' I choose my blocks filled template called block test
- <p>See the <a href="/style-guide.html">Online Style Guide</a> for detailed options</p>
- <perch:block type="text-cke" label="WYSIWYG Editor">
- <perch:content type="textarea" html editor="ckeditor" id="text" label="Content" size="xxl">
- <perch:block type="martech-partnership" label="MarTech Partnership and Recognition">
- <perch:template path="content/shared-test.html" />
The shared-test.html looks like this:
- <perch:if exists="Recognition">
- <perch:content id="Recognition" type="checkbox" label="Show MarTech Recognition" suppress>
- <perch:content id="sharedregion_recognition" type="hidden" html>
- <perch:if exists="Trusted_by">
- <perch:content id="Trusted_by" type="checkbox" label="Show Trusted By" suppress>
- <perch:content id="sharedregion_trusted_by" type="hidden" html>
And just if the information is needed, my region keys are "martech_recognition" and "Trusted_by"
I've seen places that say something along the lines of <?php perch_content('Content - Main'); ?> should be perch_content_custom - but then I have no clue what array options to have or which other region I would edit that would get my show.
Any help would be super appreciated!!!