Forum
Region not appearing
Hi Drew,
I have a page template which contains two regions. When I create a page using this template the "Content" region doen't appear in the regions list. The really weird thing is that I've used it for two other pages and it has appeared.
Any thoughts
<article>
<h1 class="below-slider" class="balance-text"><?php perch_content('Main heading'); ?></h1>
<?php perch_content_custom('Content', array (
'paginate' => true,
'count' => 4,
)); ?>
</article>
<aside>
<h3>Resources</h3>
<?php perch_pages_navigation(array(
'navgroup' =>'press',
'template' =>'press.html',
'levels' => 2
)); ?>
</aside>
perch_content_custom()
doesn't create regions - you need to useperch_content()
orperch_content_create()
to create the region.OK I'll give that a go. On the two pages that I though were using that template and are working is there a: way to check which page template is being used and b: if it is the same one will updating it lose the content they contain?
Just created a new page template using
perch_content_create()
and the region is still a no show. Is this correct?My understanding is that it would create a region call Content and that is contents would paginate after every fourth item.
Pagination is a setting for outputting a region - it has no impact on how it's created. So there are two distinct actions:
perch_content()
is unique in that it does both jobs.perch_content_create()
creates a region.perch_content_custom()
displays a region.OK got it seems to be working. Many thanks
I was wondering is there a way that I can make the pagination count user definable?
Hang on it s not, I've used perch_content() and its creating the region but not displaying it.
OK got it now (sorry its taken so long for the peny to drop!)
This seems to have done it
Is that the best way?
Yes, that's right.
Great. Thanks for you patience.
Hi Drew,
Sorry to open this up again, but the content region is still not being created (it has at least twice previously) but I've just added a new page in exactly the same way as before and… no "Content" region. same master page being used - really strange and frustrating.
The codefor the regions is…
Diagnostic below. (Not sure if its relevant but the pages are restricted to a member group.)
How about if you change
to
Seems to have done the trick. Any ideas why it did work before and then didn't - the inconsistency is a bit odd.
I think you probably need to pass a broader set of options to the create function, but it doesn't seem like that would serve you well in this instance.