Forum

Thread tagged as: Question, Problem, Configuration

perch_content_create with the regular perch tag

Is it possible to use <?php perch_content_create('****', array( with <?php perch_content('****'); ?>

I only seem to get it to work with <?php perch_content_custom('****', array(

Dan Andersen

Dan Andersen 0 points

  • 6 years ago

Dan. content_create creates the region. The region can only be created once and must happen before you can use content_custom on a region.

Robert Ketter said:

Dan. content_create creates the region. The region can only be created once and must happen before you can use content_custom on a region.

Thanks Robert!

But is can it be outputted <?php perch_content('****'); ?> or is <?php perch_content_custom('****', array( the only option to output it?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, either will work. It's just a normal region.

Dan Andersen said:

Robert Ketter said:

Dan. content_create creates the region. The region can only be created once and must happen before you can use content_custom on a region.

Thanks Robert!

But is can it be outputted <?php perch_content('****'); ?> or is <?php perch_content_custom('****', array( the only option to output it?

Dan, once the region has been created then you can use either function to output that regions contents. Content_create creates a normal region which will persist forever unless deleted by an admin/editor. If deleted it will automatically be re-created next time the page it viewed unless you remove the code. If re-created, it will be an empty region until new content is entered.

Drew McLellan said:

Yes, either will work. It's just a normal region.

Thanks, for some reason <?php perch_content('****'); ?> didn´t output anything when I tested it. I´ll double check for typos.