All blocks are called using tags {blocks}.

How can I display the individual blocks? I know they have their ID's, but I can't find anywhere in documentation how a tag invoking the individual block looks like? How to get some block's unique ID?

Additionally, is there any documentation on the list of Drupal's tags?

Guys, I am sorry - I am the Drupal beginner, and some things are very unclear to me even after fiddling with Drupal for a few weeks... :( Please, give me a hand here...

Comments

strayhand’s picture

The blocks on your page are determined by the block.module. This module has an admin page which allows you to assign:

1) Which blocks are displayed

2) Which side the blocks are on (left, or right)

3) The vertical placement of the blocks (determined by weight, blocks with higher numbers sink to the bottom)

So to answer your question, you should be able to display one or more blocks by assigning them within this admin page.

A lot of this also has to do with the template engine that you are using and the template style.

I haven't been at this very long, but I have found that the best way of figuring the drupal tags out is to look at the code for other modules. If you see something that you don't understand search for it on the doxygen documentation. If it doesn't turn up there, then chances are that it's a php function or something of that nature.

Hope that helps

SupaDucta’s picture

Actually... not much. Maybe I haven't been able to find what I needed.

I would like to invoke individual blocks outside the common {blocks} in my template, by putting tags that invoke an individual block by it's module's name, ID and delta.

Example. The HTML output of weblinks looks like this:

<div class="block block-weblink" id="block-weblink-1">

What would the tag that invokes this look like in .xtmpl? My problems is the tag syntax here, I can't figure out how tags are assembled.

I have tried {block-weblink-1} without success. What did I do wrong?

strayhand’s picture

It is my understanding that {blocks} is a placeholder that xtemplates knows how to process. You can't add your own placeholder, {block-whatever} because there is no logic within xtemplate to fill it.

I think you'll be able to do everything you need from the block admin page. Go to: /admin/system/block

Using this page you'll be able to:

- Specify individual blocks to be displayed on specific pages. You accomplish this by setting a path. If no path is present then the block displays on all pages. Read more about this here.

- You'll also be able to set which side of the page the block displays on, and what order the block displays (top to bottom).

The only circumstance that the block admin pages doesn't address would be placing blocks within the main area of a page. In this case you should probably be using nodes instead of blocks.