Sharing experience: A common way to modify templates

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Previously Li Xuebong shared a lot of ways to modify templates, but it was all about telling you which template to change, and not telling everyone about the way I modified the template, and I think this approach applies to anyone who is unfamiliar with programming to HTML. Recently many friends asked me the same question, he wanted to add some ads, statistical code, text information and so on somewhere on the page, do not know how to modify the template can be added up. Today Li Xuebong A unified answer to this question, to teach you the method I use now. This method is a common method, suitable for most template modifications. If you have a friend's way better than me, please give me advice.

Let's take a look at the case above my blog:

  

I put a lot of ads on my blog home page, why do I know to add to this place? It's not difficult. Let me take it one step at a point.

First step:

On the official website of the program to find the official release of two development and template development introduction. Mine is Z-blog's blog, so I look at the official website of Z-blog. Details of the official view of course my only z-blog system, if you are the other system that on the corresponding official website inquiries, if you are the establishment of the site can be established by the website of the company's staff.

As can be seen from the introduction of the official website:

  

Homepage template, section page (Navigation page template), and Content page template, today I only take the first page template to specifically explain, the other template modification methods similar. Through the official introduction I can confirm my homepage template file is this:

  

How can I view the name of the template? In the Z-blog background "Site Settings management" can see the template name.

  

Step Two:

FTP download or the Web site to find the file (Z-blog can be in the background to edit the template), other site systems may not be in the background to edit, then the FTP to find the file and then download. The downloaded file is opened with Notepad or Dreamweaver.

Step Three:

Determine where the information needs to be added. Here we can look at the first picture, I want to add the ads in the Baidu Alliance to the "recently published" above. I will be in Baidu inside the advertising bit height, width are set well. Then open the home page, the right mouse button "View source file" to get the following figure shows the code:

  

Then in this text I Ctrl (Lookup function) to find "recently published" as shown:

  

Make sure this is the only one and some friends may find more than one, and in this case you need to analyze exactly what you want to add to the ad. Then find the entire div (some talble) that controls the list of "recently published" articles as shown in the figure to control the list of this article is a div with id divprevious, copy this ID number.

Fourth Step:

To enter our template file press CTRL to query this ID, we can find the following code.

  

Here to say the above code < div > is the beginning </div > is the end, when we find this "latest article" list code in the whole block to make some space for our ads.

Note:.

Then put your own ad bit code into it as shown in the picture above. The above method only applies to the page with text, when we are pictures of how to do? Then the mouse pointed to the picture right--"properties" to view the address of the file, the address copy down, this address is equivalent to the "latest published" Word, and then follow the steps above step by step. Finally save exit, there is pseudo static need for file rebuild (regenerate). The above is just the way I often use to modify the template (in the case of the template structure is not clear), you master if there are other better ways please let me know, thank you.

Original article Please indicate reproduced from Chengdu SEO: Li Xuebong blog, Li Xuebong: Push a core team members, Blue Flame members, friends to help one of the founders. Welcome to join the "friends to help the website operation Group: 122567971", "push a meager mutual listening resource group: 26123261", " Friends help share group: 15532207 "," friends to help Baidu know platform: 85397296 "This article address: http://www.xp178.net/post/297.html

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.