1
이미지 링크를 만들려고하는데 내 이미지 파일이 도움이 될 수 있습니까? 감사합니다Drupal 7 이미지 링크 만들기. 쇼 이미지가 없습니까?
여기 여기 내 hook_menu
내가 이것을 알아낼 질수 function linking_module_menu() {
$items = array();
$items['linking'] = array(
'title' => 'A Linking module',
'page callback' => 'linking_module_basic',
'access arguments' => array('access content'),
);
return $items;
}
의 내 코드
function linking_module_basic(){
$content = array();
$variables = array(
'path' => 'sites\all\modules\tshirt.png',
'alt' => t('Click to create new shirt'),
'title' => t('Create shirt'),
);
$content['themed_data'] = array(
'#type' => 'markup',
'#markup' => theme('image', $variables),
'#prefix' => '<div class = "linking-module-image"><a href = "https://www.facebook.com/">',
'#suffix' => '</div></a>',
'#attached' => array(
'css' => array(
drupal_get_path('module', 'linking_module') . '/linking_module.css',
),
),
);
return $content;
}
입니다.
'linking_module_basic'함수를 호출하는 방법 및 위치 –
@prabeengiri ive가 이미 내 게시물을 편집했습니다 ... 당신이 tnx를 도울 수 있기를 바랍니다! – DAY