0

I have created a custom region regions['my_region'] from mytheme.info. I have added a block myblock to the region. Now how can I add contents to this block? Currently I have created a template file region--my_region.tpl.php and added contents there. Is this the right way? How can a normal user will be able to edit these contents?

Nitish
  • 2,695
  • 9
  • 53
  • 88

2 Answers2

0

Generally in order for your users to add content to a block they would need the "Administer Block" permission. With this permission they can access the admin>structure>block page and then edit your block to change the content. You should do this with caution, as the "Administer Block" permission may give your users a lot of control over your site.

A better way to allow your users to add content to your new region might be to create a view on admin>structure>views with an attached "block" display. This view could be configured to show any type of content that your users can create.

Once you create the view, go to admin>structure>block and drag the block display into the new region you created.

0

To display blocks content of custom region need to create file block--my-region.tpl with this content

<?php print $content ?>

in templates/block

And clear cache

QArea
  • 4,955
  • 1
  • 12
  • 22