Home > CMS Tutorial > PHPCMS > How to add fragments in phpcms

How to add fragments in phpcms

藏色散人
Release: 2020-07-21 10:07:42
Original
3288 people have browsed it

How to add fragments in phpcms: First, directly insert the fragment tag in the format of "{block('news', 1)}" into the template; then enter the background template management and click "Visualize" to see the added fragments the link to.

How to add fragments in phpcms

phpcms Add fragments:

Insert {block('news', 1)} format directly into the template The fragment tag, then enter the background template management and click "Visualization" to see the link to add fragments.

Fragment parameter description:

1. The first parameter "news" is the unique identifier of the page, you can name it yourself;

2. The second parameter "1" It is the fragment serial number of the current page, which is a positive integer. Just ensure that the same page is not repeated.

Recommendation: "phpcms tutorial"

How to create a new fragment

1. Select the template to add fragments and write a statement similar to the following {pc:block pos="chuangxinji_index_left"}{/pc} at the location to be added. "chuangxinji_index_left" is the identifier of the page, and the second parameter can be omitted.

2. Content in the background - "Content Release Management -" Fragment Management, click on the content page (if the added fragment is on the content page, click on the content page, if it is on the home page, click on the home page). In the newly jumped page, "Fragment: Fragment Name" will appear at the location where the fragment is added. Click on this fragment, click to add the fragment, and click OK after the fragment is configured.

3. Refresh. In the fragment management, the set fragment chuangxinji_index_left will appear. Click the "Maintain Content" icon, and then edit the fragment in the edit box.

The above is the detailed content of How to add fragments in phpcms. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template