Hello all, i'm trying to convert our own theme to drupal 7, but i'm having some issues... when i want to render the region it just won't show up in the region previewer, it even wont render..

heres my region define thingies:

regions[help]           = Help
regions[hello]          = Hello
regions[sidebar_first]  = First sidebar
regions[sidebar_second] = Second sidebar
regions[navigation]     = Navigation bar
regions[highlight]      = Highlighted content
regions[content]        = Content
regions[header]         = Header
regions[footer]         = Footer
regions[bottom]         = Page bottom
regions[page_top]       = Page top
regions[page_bottom]    = Page bottom

the "Hello" is a test region, it there on the block sorting screen, you can assign blocks to it, but the content just won't render...

i use this code to print it; print render($page['hello']);

Comments

i-sibbot’s picture

if there in the block admin and you can select then you .info (thingies) are fine. Its your page.tpl

demon326’s picture

yeah, there is realy something wrong, i can even remove the *.tpl.php files and the themes stays working, so it must get its data from a other place.... i think it's a cache issue in Alpha2.. will wait on the next release to see if its fixed....

i-sibbot’s picture

have you tried clearing the cache in admin / configuration / performance?

demon326’s picture

yes, multiply times, even the browser cache...

it must one of the following issues:

1) caching is broken
2) it uses other *.tpl file, but thats not possible...

i even deleted all the .tpl files in my theme folder, and yet the theme works and all the other themes are disabled....

duckzland’s picture

can you change :

print render($page['hello']);

into

print $hello;

and see if this is the problem?

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com

demon326’s picture

edit: it worked, but when i try to add my other, real regions it throws errors:

# Notice: Undefined variable: sidebar_first in include() (line 89 of C:\wamp\www\drupal7\sites\all\themes\ashladan\page.tpl.php).
# Notice: Undefined variable: sidebar_first in include() (line 101 of C:\wamp\www\drupal7\sites\all\themes\ashladan\page.tpl.php).
# Notice: Undefined variable: sidebar_second in include() (line 101 of C:\wamp\www\drupal7\sites\all\themes\ashladan\page.tpl.php).
# Notice: Undefined variable: top_content_block_left in include() (line 110 of C:\wamp\www\drupal7\sites\all\themes\ashladan\page.tpl.php).
# Notice: Undefined variable: top_content_block_right in include() (line 110 of C:\wamp\www\drupal7\sites\all\themes\ashladan\page.tpl.php).
# Notice: Undefined variable: content_top in include() (line 131 of C:\wamp\www\drupal7\sites\all\themes\ashladan\page.tpl.php).
demon326’s picture

Fixed it all... its was the fault of template.php. i still have a question and need home help, i need to add a "span' tag around my li-tabs but i don't know how....

duckzland’s picture

I have no idea how to do that in D7, haven't touched that version but in D6 you have to create a new override function in template.php like :


function phptemplate_menu_local_task($link, $active = FALSE) {
return <span>'<li '. ($active ? 'class="active" ' : '') .'>'. $link ."</li></span>\n";
}

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com

borazslo’s picture

You have fixed it, but can you tell me how?

marziyeh84’s picture

hello

i add some codes with a new region to page.tpl.php

but nothing change in website codes

i cleared cash many time no affect

jdmendez’s picture

I had this issue, and I was logged in. When you have the log-in block by itself, nothing will show up in that region while logged in.
I used echo render($page['region_name']); and worked after I logged out.

raphael812’s picture

Hello I encountered this issue of my regions not rendering. I solved it when I discovered that the Main content had to be put in the content region which is compulsory. Once that is in place everything worked fine.