Forum
page_content_custom tag not appearing in regions
Hi,
I'm trying to implement perch_content_custom tags in a template, but when I create a page using this template, the perch_content_custom tag doesn't appear as a region through the CMS.
This is the code I have (which is inside the <main> tags)
<?php perch_content_custom('page content', array( 'template'=>'_page_content.html', )); ?>
I've also included the following in the top of my document:
<?php perch_content_create('page content', array( 'template'=>'_page_content.html', )); ?>
Many thanks!
perch_content_custom()
doesn't create new regions. It just displays existing regions.You need to use
perch_content()
orperch_content_create()
to create the region.I've got perch_content_create() in the template as well as perch_content_custom() - will this cause an issue?
No, that's perfect.
Is there any other reason why this couldn't be working? I've got the html file _page_content.html in the relevant folder too. It was previously working until only recently where the template wasn't altered in any way.
Can you show us the master page you're using?
That looks ok. If you turn debug on for the page, what does it output?
Sorry for the delayed response! This is what I get when debug is turned on for a page where the content regions aren't appearing...
What about on the front end web page itself?
Hi Drew,
I actually managed to fix this issue by creating a new template, which worked fine as the pages I was trying to create needed to be slightly different anyway. I believe the issue could have been that only a limited amount of pages were able to use one template.
Regardless, everything is working fine now - thanks for your help!
There's no such limitation. It must have been something else.