#### The Second Step --- Install blocks

##### Descripton

Your site doesn't have forums, news and welcome messages a little. To welcome your friends, let's add message to the top page. And, install modules for your plan ---- baseball forum & Oregonian baseball players news. Learn how to build the top page by blocks.

##### The basic layout of homepage

The following picture shows the basic layout of homepage by XOOPS Cube Legacy.

xoopscube.org is the block layout, too. It uses left, center and right. That's standard XOOPS layout.

In most themes, you can use three columns --- the left column, the center column and the right column --- for layout. And, the upper part of the center blocks have more two columns --- the left-center column and the right-center column. You can assign "Block" to these columns.

"Block" is parts by dynamic content. Blocks belong to modules and be imported with modules. Already you have some blocks.

###### Login Block

The block you use to login is 'Login Block'. This block is installed by default. This block shows text boxes for user's name and password. And, it hides its own display for registered users.

###### Main Menu Block

This is the standard automatic main menu block for all users. The main menu block shows menus which the current user can access to.

###### User Menu Block

This is personal menu for registered users. This block is also one of three blocks installed by default.

##### The Second Step (1) --- How to install new blocks

###### Block Installation

At first, try to install "Site Info" block to the right column. This block shows administrators of your site. By that, visitors can get nickname and address of administrators. Click 'Block Install' of Legacy module in the left block of the control panel.

Then, you get the list of unused blocks.

Find "Site Info" block, and click the install icon of the row indicating the block.

###### Block Installation

"Site Info" block isn't installed yet. You must input some settings for the block.

###### Title

A title of this block for visitors. You don't need to change it this time, if you don't hope.

###### Side

Specify which column you hope to assign the block to. Ok, this time, specify "Side block - right".

###### Weight

Alignment sequence of the column. You may keep the default value, this time.

###### Cache time

You can specify how long the system keeps the cache of the block. In the case where the cache is active, the system doesn't call a program of the block while the cache file is kept. That's a little difficult settings. This time, you may skip.

###### Target modules

Specify which modules you hope to display the block in. Ok, this time, specify "Toppage" only.

###### Target groups

Specify which groups you give permission to view the block to. What's a group? Groups are a collection of users, which has permissions to access modules or the control panel. You alredy have three system-fixed-groups. These groups are special, so the administrator can't delete them.

Webmasters
  This is the top group of this site. Users in this group is allowed any action. The administrator you use to login belong to this group.
Registered Users
  Common users who registered through the user registration, belong to this group by default.
Anonymous Users
  This group means unregistered users.

Ok, this time, specify all of three groups. Because you don't need to hide the block for any users.

###### Options

In the case where the block has optional settings, this item is shown. You don't need to change any fields, this time.

###### Install

After you finish settings, push the install-button! Then, go to the homepage to confirm the block.

##### The Second Step (2) --- How to control a weight of blocks

Install one more blocks. Let's install "Search" block so that users can search contents with keyword(s). When you install the block, choose "Side block - right" and "all modules" for target modules. By that, the right column came to keep two blocks. "Search" block shows up in all pages, but "Site Info" block shows up in the top page only.

Next, try to control a weight of these blocks. Click "Block Management" of legacy module in the left block of the control panel.

You see the list of installed blocks.

Input 1 to a weight of "Search" block. And, input 5 to a weight of "Site Info" block.

After then, push "Submit" button. By that, "Search" block comes always to be displayed before "Site Info" block.

##### The Second Step (2) --- How to use custom blocks

Now, let's add "the welcome message" to the top page of your site. Of course, blocks are good to do it. But, you don't find the best block to just display messages. In those cases, custom blocks are useful.

At first, go to the block management. Next, click "Add cutom block" on the top of the table.

Then, you see the edit-form to create a new custom block. This form shows some fields you know. About them, you don't need explanations. Explains new fields at this section.

###### Content

The content of the block. Type decides how to render this content. This time, input welcome message.

###### Type

This field decides how to render the content of the block. There are four types.

HTML
  HTML Mode. You must input to the content field as HTML document.
PHP
  PHP Mode. You must program in the content field. You should not choose this type until you understand XOOPS & PHP enough.
Auto format with smilies
  This is the most handy type. You can input messages to the content field as well as forum.
Auto format without smilies
  You can't use smilies. The rest is same as the last type.

This time, choose "Auto format with smilies" and input a welcome message. And, let's assing this block to the center block for any groups.

##### Conclusions

Basically, site owners don't use some HTML editor in XOOPS Cube Legacy. Themes offer columns as "slot" for you. Therefore, you may assign blocks to the slot.

GO TO NEXT STEP