I want to display a button on the homepage. The best solution i've thought about was to render it in a block. The code is the following :
$button['my_tickets'] =array(
'#type' => 'link',
'#title' => t('My tickets'),
'#href' => '',
'#class' => 'btn btn-default',
'#id' => '',
'#options' => array(
'html' => true,
)
);
And here's the theme :
function My_module_theme() {
return array(
'my_module_my_button' => array(
'variables' => array('vars' => NULL),
'template' => PATH_TO_TEMPLATE,
),
);
}
Problem : The link isn't rendered with the classes inside the "a" tag. How can I do that ?
admin/structure/block/add
and using the WYSIWYG editor to make the link and then style it as a button?