Frage

I am a new in drupal development. I know about Creating region in custom theme.But I want to create a subtheme as base theme of omega. I want to add the new region but not worked I cannot add the blocks in this region?Any one help me?

War es hilfreich?

Lösung

In your omega subtheme .info file add a new region:

regions[machine_name] = 'Actual Name'

Then clear your cache, go to the subtheme appearance settings, click the "Zone and region configuration" tab, and scroll down to the bottom to find your "unassigned regions". Simply assign it to a zone, configure the options above, and save.

Then add a block to the region in Structure->Blocks and template it appropriately.

Andere Tipps

First define regions in your theme .info file. See: Structure of the .info file

Then put the relevant template tags in your page.tpl.php file. For example if you defined the region sidebar in your themes .info file, you would then add: <?php print render($page['sidebar']); ?> to the relevant place in your page.tpl.php.

NOTE: If your theme doesn't have a page.tpl.php file you can copy the default from your base theme, and modify that copy. and do clear the cache.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top