In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the method of adding template to phpcms, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
How does phpcms add templates?
This paper takes the addition of channel page template as an example to explain, and other analogies in turn.
1. Suppose we have created a new "phpcms tutorial" column, and the template for this column cannot be created by default.
Open the / phpcms/templates/default/content directory and create the following files:
Column home page template: category_cmsjc.html
Column list page template: list_cmsjc.html
Content page template: show_cmsjc.html
Note:
The column name I added begins with category_, list_, and show_.
Files at the beginning of category_ will be automatically recognized as "column home template" when selecting a template, and will not appear in other template options.
Files at the beginning of list_ are automatically recognized as "column list page templates" when you select a template, and do not appear in other template options.
Files at the beginning of show_ are automatically recognized as "content page templates" when you select a template and do not appear in other template options.
Add the rest of the templates, and so on
After the establishment is completed, it can be displayed when you select the template, but instead of the "article channel page (category.html)" as the default, there will be "category_cmsjc.html", which means we have to continue to modify it.
2. Open / phpcms/templates/default/config.php file
find
'templates | default | content' = > array (' category.html' = > 'article channel page', 'category_download.html' = >' download channel page', 'category_picture.html' = >' picture channel page', 'download.html' = >' download link page', 'footer.html' = >' bottom', 'header.html' = >' top', 'header_min.html' = >' mini top', 'header_page.html' = >' single page header', 'index.html' = >' website home page' List.html' = > list Page, list_download.html' = > download list Page, list_picture.html' = > Picture list Page, message.html' = > message Tip Page, page.html' = > single Web Page, rss.html' = > RSS Page, search.html' = > search, show.html' = > Article content Page, show_download.html' = > download content Page 'show_picture.html' = >' Picture content Page', 'tag.html' = >' tag',)
You can add it anywhere in this array. The habit of the webmaster of CMS concentration camp is to add the content under the corresponding name:
'templates | default | content' = > array (' category.html' = > 'article channel page', 'category_download.html' = >' download channel page', 'category_picture.html' = >' picture channel page', 'category_cmsjc.html' = >' phpcms tutorial article channel page', 'download.html' = >' download link page', 'footer.html' = >' bottom', 'header.html' = >' top', 'header_min.html' = >' mini top' 'header_page.html' = >' single page header', 'index.html' = >' website home', 'list.html' = >' list page', 'list_download.html' = >' download list page', 'list_picture.html' = >' picture list page', 'list_cmsjc.html' = >' CMS concentration camp list page', 'message.html' = >' message tip page', 'page.html' = >' single web page', 'rss.html' = >' RSS page' 'search.html' = >' search', 'show.html' = >' article content page', 'show_download.html' = >' download content page', 'show_picture.html' = >' picture content page', 'show_cmsjc.html' = >' CMS tutorial article content page', 'tag.html' = >' tag',)
After doing this, when you select the template, it will be the same as the default style. "phpcms tutorial articles Channel Page (category_cmsjc.html)"
Thank you for reading this article carefully. I hope it will be helpful for everyone to share the method of adding templates to phpcms. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.