23.02.2015 Views

www.it-ebooks.info

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5<br />

<br />

<br />

<br />

Now, in the Magento backend, if we navigate to System | Permissions | Roles, select<br />

the Administrators role, and try to set Roles Resources at the bottom of the list; we can<br />

see the new ACL resources we created, as shown in the following screenshot:<br />

By doing this, we gain granular control over which operations each user has<br />

access to.<br />

If we click on the Manage Registries menu, we should get a blank page; since we<br />

haven't created the corresponding grid block, layouts, and templates, we should see<br />

a completely blank page.<br />

So let's start by creating the blocks that we will need for our new grid; the way we<br />

will create our gift registry grid will be slightly different from what we did for our<br />

Customers tab.<br />

We need to create a grid container block and a grid block. The grid container is used<br />

to hold the grid header, the buttons, and the grid content, while the grid block is only<br />

in charge of rendering the grid w<strong>it</strong>h pagination, filtering, and mass actions. Perform<br />

the following steps:<br />

1. Navigate to your block Adminhtml folder.<br />

2. Create a new block called Registries.php at the location app/code/local/<br />

Mdg/Giftregistry/Block/Adminhtml/:<br />

[ 147 ]<br />

<strong>www</strong>.<strong>it</strong>-<strong>ebooks</strong>.<strong>info</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!