迅睿CMS框架是一款PHP8高性能·簡(jiǎn)單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費(fèi)且不限制商業(yè)使用,是免費(fèi)開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計(jì)理念,支持的微信公眾號(hào)、小程序、APP客戶端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
自定義頁(yè)面的,模板如何調(diào)用公共模板?
例如調(diào)用:
{template "header.html"}
{template "header.html", "/"}
調(diào)用上一級(jí)頭部文件,適用于插件模板里面
回復(fù)@官方插件實(shí)習(xí)技術(shù) 模板在根目錄,需要調(diào)用template目錄下的header.html
/自定義頁(yè)面目錄/index.html 調(diào)用 /template/pc/模板/home/header.html
這句放在: /template/pc/模板/home/page/index.html, 就是他上一級(jí),也就是調(diào)用 /template/pc/模板/home/header.html
回復(fù)@官方插件實(shí)習(xí)技術(shù)
不是,那個(gè)模板是在根目錄的,不是你說的這個(gè)目錄。根目錄的這個(gè)調(diào)用/template/pc/模板/home/header.html
如果都是同一個(gè)模板目錄我就會(huì)調(diào)用,但是不是同一個(gè)目錄
回復(fù)@官方插件實(shí)習(xí)技術(shù) 你看看
temlate調(diào)用范圍之內(nèi)在/template/pc/模板/home/內(nèi),home屬于根,之內(nèi)調(diào)用這里面之內(nèi)的文件
1樓正解~~~
{template "header.html", "/"}
調(diào)用上一級(jí)頭部文件,適用于插件模板里面
回復(fù)@官方插件實(shí)習(xí)技術(shù) 模板在根目錄,需要調(diào)用template目錄下的header.html
/自定義頁(yè)面目錄/index.html 調(diào)用 /template/pc/模板/home/header.html
{template "header.html", "/"}
這句放在: /template/pc/模板/home/page/index.html, 就是他上一級(jí),也就是調(diào)用 /template/pc/模板/home/header.html
回復(fù)@官方插件實(shí)習(xí)技術(shù)
不是,那個(gè)模板是在根目錄的,不是你說的這個(gè)目錄。根目錄的這個(gè)調(diào)用/template/pc/模板/home/header.html
如果都是同一個(gè)模板目錄我就會(huì)調(diào)用,但是不是同一個(gè)目錄
回復(fù)@官方插件實(shí)習(xí)技術(shù)

你看看
temlate調(diào)用范圍之內(nèi)在/template/pc/模板/home/內(nèi),home屬于根,之內(nèi)調(diào)用這里面之內(nèi)的文件
1樓正解~~~