Block Within a Block

You can add a block inside of another block with just 3 simple steps. 

The first step is to add a single line to the site configuration file.  Find the AVENGER ADDED SETTINGS section and inside the array for avenger.BlockPositionsAdditional add this line:

'position_name => 'Position Name - Short Description for this Position'

If AVENGER ADDED SETTINGS doesn't exist add it at the bottom of the config file and if the avenger.BlockPositionsAdditional doesnt exist you can add it using the following format:

/**
 * AVENGER ADDED SETTINGS
 */
$config['avenger.BlockPositionsAdditional'] =
array(
        'position_name => 'Position Name - Short Description for this Position'
);

Second, you need to create your block.  Go to Site Management, then Blocks, then click Add.  Go to the Position Tab and in the Position Dropdown choose the Block Position that you added in step 1.  Choose the appropriate page assosciations as well and enter your copy or particular block type and any other settings neccessary.

Last, you need to add in the code into the blocks template file that will call the other block.  The code for that is:

<?php echo $this->element( 'render_blocks', array('position' => 'your_block_position_here', 'divhide'=>true) ); ?>


Just replace "your_block_position_here" with your actual block position identifier being careful to leave the single quotes in place.


You should now have a block within a block.

1-207-221-3255 | Contact Site Avenger - Your Content Management Superhero

Copyright © 2023 Saco Design, Inc. | All Rights Reserved | Website Design by Saco Design | Superpowered by Site Avenger