I just created my own theme and in the “Blocks” folder (of my theme, of course) I’ve created 4 files:
- top.php
- logo.php
- mainnav.php
- header.php
2 of them (mainnav, header) are for overrides and the other 2 (top, logo) are new.
Now… this is what I have in top.php
[PHP]
<?php $this->genBlockBegin ($block) ?>
<?php if( $this->countModules(‘top’) ) : ?>
<div id=”ja-top” class=”clearfix”>
<jdoc:include type=”modules” name=”top” style=”raw” />
</div>
<?php endif; ?>
<?php $this->genBlockEnd ($block) ?>
[/PHP]
The same code for open blocks(begin) and close them(end) are in the other 3 php files (logo, mainnav, header) -obviously, each one have different code to display their own functions. Anyway, when I reload the page the positions are still in the same place that in “default” layout.
Note: I already choose my theme as a default from the profiles options and I already add the new blocks and change the positions in my xml layout just like this:
<blocks name="top" style="xhtml">
<block name="absolute" type="modules" style="raw">absolute</block>
<block name="top" type="top" style="raw">top</block> ---TOP
<block name="logo" type="logo" style="raw">top</block> ---LOGO
<block name="mainnav" type="mainnav" style="raw"></block> ---MAINNAV
<block name="header" type="header" style="raw"></block> ---HEADER
<block name="cpanel" type="usertools/cpanel"></block>
<block name="topsl" type="spotlight">user1,user2,user3,user4,user5</block>
</blocks>
The Question Is: Why the theme still keep the default position if I already changed the positions?