The page.tpl.php file is within your theme's folder. Usually either /themes/themename/page.tpl.php or /sites/all/themes/themename/page.tpl.php.
---
Yuriy Babenko www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials
Yes it does, but its not a phptemplate theme so you have to do things a little different.
You have added your new region in chameleon.info - that is the same, so no problem there, lets call it "content top".
So in chameleon.info you have;
regions[content_top] = Content top
Now open up the file "chameleon.theme". This is the main theme file for chameleon, and where you need to make your next set of changes.
First you have to call the blocks - look for this (around line 26) and see how I have added the new block region:
// Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.)
$blocks_left = theme_blocks('left');
$blocks_right = theme_blocks('right');
// Get the New block region - content_top
$blocks_content_top = theme_blocks('content_top');
Step 3, nearly there! Now we need to print the region somewhere so we can output the blocks. You want this somewhere above the content but you don't specify where, so I'll assume its below the title.
Look around line 76 - you can see the main content td is opening and the breadcrumb and $title are right below it, so this must be the centre column.
We need to place this snippet below the $title (place this around line 80 or 81);
if ($show_blocks && !empty($blocks_content_top)) {
$output .= "<div id=\"content-top\">$blocks_content_top</div>\n";
}
This will output a div with the ID of content-top, so you can style it.
I have never even looked at this theme until I read your question and I only tested for about 3 seconds so if I have done anything that will cause issues can someone point that out please, as far as I can see, this is just fine (and it works too).
Comments
or how do i just add content
or how do i just add content blocks? the one i really want is the before content block tho. please help
What you need to do is
What you need to do is create a new "region" and add your block to it. Here's a tutorial: http://yubastudios.com/blog/drupal-creating-new-regions
---
Yuriy Babenko
www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
thanks buddy. People like
thanks buddy. People like you make me happy!
ok so i added the regions in
ok so i added the regions in the info file and i cleared registry
The blocks showed but when I save the block in the top content the content is not visible on my homepage?
i see you have a update that i need to add more stuff to the page.tpl.php where is that located? i cannot find it!
The page.tpl.php file is
The page.tpl.php file is within your theme's folder. Usually either /themes/themename/page.tpl.php or /sites/all/themes/themename/page.tpl.php.
---
Yuriy Babenko
www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
the file page.tpl.php is not
the file page.tpl.php is not there i looked all over the place only bluemarine and garland themes carry that file?????
i am using the chameleon theme.
does that theme have that
does that theme have that feature? to add blocks?
Implementing new regions in Marinelli theme.
Implementing new regions in Marinelli theme.
See a solution here:
Blocks above (before) main Content. (Marinelli theme, but think it works for any theme)
http://drupal.org/node/292028
Claudio Gaston Abraham
(mrbrowny in Drupal)
Argentina
South America
Yes it does, but its not a
Yes it does, but its not a phptemplate theme so you have to do things a little different.
You have added your new region in chameleon.info - that is the same, so no problem there, lets call it "content top".
So in chameleon.info you have;
Now open up the file "chameleon.theme". This is the main theme file for chameleon, and where you need to make your next set of changes.
First you have to call the blocks - look for this (around line 26) and see how I have added the new block region:
Step 3, nearly there! Now we need to print the region somewhere so we can output the blocks. You want this somewhere above the content but you don't specify where, so I'll assume its below the title.
Look around line 76 - you can see the main content td is opening and the breadcrumb and $title are right below it, so this must be the centre column.
We need to place this snippet below the $title (place this around line 80 or 81);
This will output a div with the ID of content-top, so you can style it.
I have never even looked at this theme until I read your question and I only tested for about 3 seconds so if I have done anything that will cause issues can someone point that out please, as far as I can see, this is just fine (and it works too).
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.