我有这个:
<?php echo $this->htmlLink($this->viewer()->getHref(), $this->itemPhoto($this->viewer(), 'thumb.icon')); ?>
这会生成一个 HTML 代码,例如:
<a href="http://www.domain.com/john">
<img src="http://www.domain.com/thumb_0205.jpg" alt="" class="thumb_icon item_photo_user thumb_icon">
</a>
现在,我想做的是添加:
<?php echo $this->viewer()->getTitle(); ?> //This will generate the member's name, like "John Doe"
到上面的代码,生成一个 HTML 代码,如:
<a href="http://www.domain.com/john">
<img src="http://www.domain.com/thumb_0205.jpg" alt="" class="thumb_icon item_photo_user thumb_icon">
<span>John Doe</span>
</a>
反正我能做到吗?
谢谢