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.
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!