I have a views-view-unformatted--viewsname--attachment.tpl.php. I want to print region in this file.
I added
function mytheme_preprocess_views_view(&$vars) {
if ($blocks = block_get_blocks_by_region('regionname')) {
$vars['region'] = $blocks;
}
}
to template.php
.
and added
echo render($region);
to views-view-unformatted--viewsname--attachment.tpl.php
but print nothing.
What is wrong? How can I print region in views.tpl.php
?
i tested this with mytheme_preprocess_html and html.tpl.php and it worked.