Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Joekz on
Hi,
I created a portfolio.module
function portfolio_init() {
drupal_add_js(drupal_get_path('module', 'portfolio') . '/js/jquery.swipebox.min.js', array('scope' => 'footer'));
drupal_add_js(drupal_get_path('module', 'portfolio') . '/js/snippet.js', array('scope' => 'footer'));
}
/**
* Implements hook_block_info().
*
*/
function portfolio_block_info() {
$blocks = array();
$blocks['portfolio'] = array(
'info' => t('Portfolio'),
);
return $blocks;
}
/**
* Implements hook_block_view().
*/
function portfolio_block_view($delta = '') {
$block = array();
// $block['subject'] = t('My Special Module');
$block['content'] = theme('portfolio', array('myvar' => 'helloworld'));
return $block;
}
function portfolio_theme() {
$items['portfolio'] = array(
'template' => 'portfolio',
'render element' => 'content'
);
return $items;
}
I have a profile2 with 'employeers' profile type with many fields and i would like to display [field_logo] and [field_description] in my portfolio.tpl.php.
How can I do that?
Thank you !