Create a separate PHP file and reference the template file in dedecms

Source: Internet
Author: User
As a question, I have created a single PHP file. Now I want to import it to the dedecms template file head.htm. How can I associate it? The directly imported file displays the code in head.htm. I didn't explain how to deal with tags in DEDECMS? As a question, I have created a single PHP file. Now I want to import it to the dedecms template file head.htm. How can I associate it?
The directly imported file displays the code in head.htm. I didn't explain how to deal with tags in DEDECMS?

Reply content:

As a question, I have created a single PHP file. Now I want to import it to the dedecms template file head.htm. How can I associate it?
The directly imported file displays the code in head.htm. I didn't explain how to deal with tags in DEDECMS?

You need to use the dedecms template interpretation engine and load the template file according to the usage.
We recommend that you copy an existing file and modify it. In this way, you can view the effect at any time.

Previously, I wrote a related "tutorial" in my blog. In fact, it is very simple to load the template parsing class of zhimeng. Create example. php In the root directory. The Code is as follows:


  SetTemplet ($ tempfile); // set the template file path $ pv-> Display (); // Display this page?>

Then create an example.htm template file in your current template directory. In this template file, you can useGlobal tag. More detailed introduction you can go to the blog View Original: http://www.xuewl.com/framework/dede_class_system_partview.html

Modify the index.html file in the root directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.