编程开源技术交流,分享技术与知识

网站首页 > 开源技术 正文

thinkcmf的文章页面中显示音乐文件,附件等

wxchong 2024-09-06 01:11:21 开源技术 10 ℃ 0 评论

首先后台添加音乐上传.然后文章页面中添加如上代码.

<a href=/upload/{$article.more.audio}>{$article.more.audio} </a>



以下是扩展功能:

调用文件缩略图

<notempty name="article.more.thumbnail">
   <img src=" {:cmf_get_image_url($article.more.thumbnail)}"/></notempty>

调用文章的相册

<!--调用文章的相册--><notempty name="article.more.photos">
	<foreach name="article.more.photos" item="photo">
    	<img src=" {:cmf_get_image_url($photo.url)}" alt={$photo.name}/>
    </foreach></notempty>

调用文章的附件

<!--调用文章的附件--><notempty name="article.more.files">
	<foreach name="article.more.files" item="file">
    	<a href="{:cmf_get_file_download_url($file.url)}" title={$file.name}>下载文件</a>
    </foreach></notempty>

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表