Weaving Dream Imitation Station Learning notes (i)

Source: Internet
Author: User
Tags php class
"PHP" weaving Dream Imitation Station Learning notes (i)

Imitation stations are cloned against the target site. Imitation station mainly from the page style and function of imitation.
What we usually call The imitation station is the use of CMS (Content management System) as the background of the site, while the imitation is the target station static template. DEDECMS's label is simple, is the PHP class website imitation station's first choice.

Prepare the article

First, the target station (determined to imitate the site)

Second, the software

    • Wampserver build Configuration Complete
    • Dreamvear Installation Configuration complete
    • Dream Weaving software installation configuration complete
    • CSS Image Downloader
    • Lao Li imitation Station special device

step article

First, the establishment of Dede template

    1. Start wampserver, open www directory
    2. Locate the Dede installation directory, open the Templets folder, and create the Dede template (try for example here)
    3. Create folders (images, style) and HTM files (index, list_article, article_article) separately under try
      Note: 1.dede templates exist in the form of an HTM
      2.dede mainly based on index (home), list_article (List page), Article_article (content page)
      3. css, JS, etc. are stored in the style

Second, analyze the website, make Dede template

1. Save the source file first
(1) In the page blank right click, view the page source code, CTRL+A,CTRL+C, with DW open index.htm,ctrl+v the source code copy and paste in, and in the source code page by clicking on the blue font, will css,js open save in the previous style folder

(2) Open the download good CSS Picture downloader, will ① enter step one in the establishment of images path, ② to download Web site URL, ③ download, with CSS image downloader download image directly down to the designated location, save a lot of tedious steps

2. Next to the website analysis, take the following website as an example, in the home navigation bar has three items, respectively can click to different pages



Corresponding to the Dede, we can build three columns to achieve, remember to build a good column or every update after a certain point generated, the homepage is the same, otherwise the page will have problems (note: Usually contact page, optional cover template)

3. Conversion code
(1) Since we are making the Dede template, we are going to replace the part of the code, open the old Li imitation station dedicated device, with the generated Dede code to replace the following code

(2) Through code analysis, with a for loop to complete the navigation bar code replacement

Before replacing

After replacement
4. Update debugging
will be replaced after the site, home page, the column to create updates, open the browsing check, debugging to no problem can

The above describes the weaving Dream Imitation Station Learning notes (a), including the content of the article, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.