函数theme_uc_cart_block_title()位于uc_cart.module模块中:
<?php
theme_uc_cart_block_title($cart_image, $uc_cart_path, $arrow_up_image)
?>
描述:
这个函数负责购物车区块标题栏的显示。你可以使用它来覆写该函数的部分功能,如果通过区块配置页面修改标题的话,那么会同时删除图片和Javascript功能,许多人都希望能够保留这些功能。
参数:
· $cart_image - 购物车图标的URI
· $uc_cart_path - 购物车模块目录的基路径
· $arrow_up_image - 向上箭头图片的URI
返回值:
返回一个字符串,包含了购物车区块标题的HTML输出。
示例:
<?php
// The default function from uc_cart.module.
function theme_uc_cart_block_title($cart_image, $uc_cart_path, $arrow_up_image) {
$output = l('<img src="'. $cart_image .'" id="block-cart-title-image" alt="" />', 'cart', NULL, NULL, NULL, FALSE, TRUE)
.'<span class="block-cart-title-bar" id="block-cart-title-bar-text" onclick="cart_toggle(\''. $uc_cart_path .'\');">'
.'<span id="block-cart-title">'. t('Shopping Cart') .'</span></span>'
.'<span class="block-cart-title-bar" id="block-cart-title-bar-arrow" onclick="cart_toggle(\''. $uc_cart_path .'\');">'
.'<img id="block-cart-title-arrow" "src="'. $arrow_up_image .'" alt="[]" title="'. t('Expand cart block.') .'" /></span>';
return $output;
}