현재 Drupal 6의 기본 테마에 theme_blocks()
을 사용하고 있습니다. theme_blocks()
이 Drupal 7에서 사용되지 않았기 때문에 테마를 Drupal 7로 변환하는 데 어려움이있었습니다. 아래 코드는 기능의 간단한 구현이며 현재 내가 사용하는 방법입니다 드루팔 6 :Drupal 6 테마를 Drupal 7로 변환하는 동안 theme_blocks()에 대한 해결 방법이 있습니까?
/* Implementation of theme_blocks() */
function theme_blocks($region) {
var output = '';
if ($list = block_list($region)) {
//cycle through all blocks in a region
foreach ($list as $key => $block) {
//test each block for a given condition
if ($block->delta == 1) {
output = /* make some changes */
}
else {
output = /* theme per usual */
}
}
}
return $output;
}
그래서, 기본적으로 난 그냥, 지역의 모든 블록을 순환 theme_blocks()
를 사용하여 특정 블록을 대상으로, 그리고 몇 가지를 변경했다. 문제는 theme_blocks()
이 더 이상 Drupal 7에서 사용되지 않는다는 것입니다.
특정 지역에서 특정 블록/블록을 타겟팅하고 Drupal 7의 테마 설정을 기반으로 동적으로 변경하는 방법이 있습니까?