Code: Select all
{cms_module module='Banners' category="Banners"}
Code: Select all
{cms_module module='Banners' category="Banners"}
Instead of including your banners the common way$category = $params['category'];
global $gCms;
if( !isset( $gCms->modules['Banners'] ) ||
!isset( $gCms->modules['Banners']['object'] ) )
{
return;
}
$returnid = "";
if (isset($gCms->variables['pageinfo']))
{
$returnid = $gCms->variables['pageinfo']->content_id;
}
$banners = $gCms->modules['Banners']['object'];
$banner_param['category'] = $category;
ob_start();
$banners->DoAction( 'default', 0, $banner_param, $returnid );
$bannerlink = ob_get_contents();
ob_end_clean();
if( preg_match( "/alt="([^"]*)"/", $bannerlink, $matches ) == 1 )
{
$text = $matches[1];
$bannerlink = str_replace( "", "$text", $bannerlink );
}
echo( $bannerlink );
now you do it this way:{cms_module module='Banners' category="Banners"}
This prints your image's alt text below/after the image. (If you want to add a line break before the text, use "$text{BannerText category='Banners'}
Code: Select all
{
$text = $matches[1];
$bannerlink = str_replace( "</a>", "$text<br /></a>", $bannerlink );
}
echo( $bannerlink );
it should be"$text
"
Eberhard"
$text"