中文字幕一区有码视三区-日本一区二区三区精品视-亚洲毛片18禁在线看-国产欧美亚洲91在线

J5增加PDF附件下載功能

weeya1年前JTBC教程397

1、模塊管理增加att字段,選擇29附件管理器
2、模板代碼
<table class="table table-striped m-0">
<tbody>
<tr>
<th class="border-top-0">
 附件下載:
</th>
<td class="border-top-0">
<a href="{$=$htmlEncode($getValueFromJSON(#att, '0->filepath'))}" alt="{$=$htmlEncode($getValueFromJSON(#att, '0->filename'))}" target="_blank">{$=$htmlEncode($getValueFromJSON(#att, '0->filename'))}
</a>
</td>
<td class="border-top-0">
<a href="{$=$htmlEncode($getValueFromJSON(#att, '1->filepath'))}" alt="{$=$htmlEncode($getValueFromJSON(#att, '1->filename'))}" target="_blank">{$=$htmlEncode($getValueFromJSON(#att, '1->filename'))}
</a>
</td>
</tbody>
</table>
到此完工。


下列方法無上傳附件文章id有報錯。
2、模板調(diào)用{$=$render('global.render.pdf',$jsonDecode(#att))}
3、pdf節(jié)點代碼如下:
<table class="table table-striped m-0">
<tbody>
{@}<tr>
<th class="border-top-0">
附件下載:
</th>
<td class="border-top-0">
<a href="{$filepath}" alt="{$filename}" target="_blank">{$filename}
</a>
</td>
</tr>
{@}
</tbody>
</table>

相關(guān)文章

J5偽靜態(tài)

Public/news/.rewrite的地址重寫配置:<?phpreturn [  [    'file' => 'ind...

J5_11增加手機站

1、Public/common/diplomat/index.php文件    return Jtbc::take('index.index');替換成&...

J5_09搜索

    需要在可以被搜索的模塊目錄中手動添加common/search.jtbc引導(dǎo)文件來激活搜索功能    需要手動構(gòu)建關(guān)鍵字輸入框并通過...

J5列表中獲取當(dāng)前分類的父分類ID

以新聞模塊為例子。打開/news/common/diplomat/index.php找到public function list(Request $req, Response $res)函數(shù)修改以下內(nèi)...

J5_04產(chǎn)品新聞列表頁

1、頭尾模板調(diào)用代碼{$=$take('global.communal.header')}{$=$take('global.communal.footer')}1、模塊...

J5模塊首頁-列表分類-文章頁面自定義TDK

J5模塊首頁-列表分類-文章頁面自定義TDK方法1、模塊添加字段,后臺開發(fā)維護》模塊管理》右邊的設(shè)置,在模塊設(shè)置界面,點擊右上角添加新字段按鈕添加3個字段,用來存儲自定義的TDK數(shù)據(jù)seotitle,...

發(fā)表評論    

◎歡迎參與討論,請在這里發(fā)表您的看法、交流您的觀點。