Community Documentation

v3 Knowledgebase

How to Make a Block in AdminCP in V3

If you want to add a block from within the AdminCP CMS here is how to do that. For this example, we will add a sign up button block to the visitor page.


AdminCP-->CMS-->Add New Block

Once you click the above, you will see page to add a Block.

add newblock.png

Block Details:

Product: Core (or whatever your block is for)

Module: User(what module on your site is the Block for?)

Title: Enter a title for your Block

Type: HTML (Select from PHP Block File, PHP Code, HTML Code)

Controller: core.index-visitor(which page do you want this Block to show on?)

Component: This will not show for our tutorial because we are making an HTML block(Set which component this Block is part of (whether you set this depends on your choice of Type))

Placement: Block 11(in which of the pre-defined locations do you want this Block to appear on the page?)

Can drag/drop: (will not show for our tutorial because it's an html block) Set whether this Block is movable for your members.

Active: Yes (Set whether this is an active Block).

PHP/HTML Code: (This will only show if you selected one of these in the Type selection. Add your PHP/HTML code in the Block area.)

<div id="header_user_register">
			<div class="holder">
				<div id="header_user_register_holder">					
					<a href="{url link='user.register'}">{phrase var='user.sign_up'}</a> 					
						{phrase var='user.ssitetitle_helps_you_connect_and_share_with_the_people_in_your_life' sSiteTitle=$sSiteTitle}
					<div class="clear"></div>

User Group Access:

Control which user groups can see this Block. Uncheck those user groups that you do not want to see this Block.

Submit it to save it.