Learn dedecms templates and template tutorials from scratch.

Source: Internet
Author: User
Dedecms is really a great system. I have never paid much attention to other CMS systems since I got in touch with it for a year. I recommend that you build a website or prepare to change it. Program Friends use dedecms. As Plato said: the sword has exceeded, and the world will be chaotic. The choice of dedecms V3 is invincible. Select it.

Since dedecms was developed by Plato alone, it is impossible to provide complete Use Promotion Services just as it is mobile. In terms of templates, there is only one set of default templates, and there is no detailed tutorial for template creation and use, only the description of the template label makes it difficult for many basic friends. When I first came into contact, I posted a post asking me how to change the number of lists when I made the list page. Until now, someone posted a post asking me how to change the number of lists, A lot of people will not search ). In the forum, I also saw many of my friends posting that there were not enough templates, and the templates were not used, and they were not very helpful. Then I posted a post to let it go. There are very few templates shared on the Forum, and there are not many templates available in real time. This is also related to our national conditions. Not many people like to share them, but some spam still sell the shared items and despise them!

As the saying goes, it is better to ask for your own, and there is no template to do it. Publish this article when you are out of dateArticleEveryone is willing to get up early and despise me.

This article is intended for friends who have no foundation for the "proletarian". If you are a master or an "asset class", you will not have to read it, "asset-class brothers" let me do it to ensure quality.

Basic
Learn HTML
What is CMS template? In fact, the CMS template engine is added.CodeHTML pages, so the basics are HTML language learning. There are not many HTML tags, so it is easy to learn. The search is full of tutorials, this is what we call "Div + CSS", which requires a lot more improvement. We need to learn CSS. You can download the CSS manual and learn to modify the template as needed, every day, you only need to spend some time learning. If you really want to learn how to make Web products, you can always visit my website.

Learning Dede template code
Before learning the code, if you are a newbie, use the default template to familiarize yourself with the Dede system, system settings, how to add columns, how to set templates for topics, how to post articles, and how to change articles, there is a basic concept.

The dedecms code is very distinctive. It can be used quickly and flexibly as long as you are familiar with it. The Code style of the Dede template engine is as follows:

{Dede: Tag Name attribute = 'value '/}
{Dede: Tag Name attribute = 'value'} {/Dede: Tag name}
{Dede: Tag Name attribute = 'value'} custom style template (innertext) {/Dede: Tag name}
We can see from the above that the code of the Dede template engine can be divided into three parts: Tag Name, attribute, and custom style template. The Tag Name and attribute are surrounded {}.

The custom style template is between two.

For descriptions of tag names and attributes, refer to the template tag reference in system help. Here we will introduce the specific usage methods.

Let's take a look at the following example:

{Dede: arclist typeid = '0' titlelen = '28' ROW = '10 '}
<Li> <a href = '[field: arcurl/]'> [field: Title/] </a> </LI>
{/Dede: arclist} is the most basic marker for getting the latest content list, starting from {Dede: arclist property typeid = ''titlelen = '28' ROW = '10' Col = '1'} template style <li> <a href = '[field: arcurl/] '> [field: Title/] </a> </LI> and end mark {/Dede: arclist. After creating the page, you can add the Dede code. Before Dede code is added:


after code is added

<Ul>
{Dede: arclist typeid = '0' titlelen = '28' ROW = '10 '}
<Li> <a href = '[field: arcurl/]'> [field: Title/] </a> </LI>
{/Dede: arclist}
</Ul>
After the template is parsed, the code is added. List tag, link flink tag, navigation channel tag, and mynews tag wait in the station are all the same.

The document page uses {Dede: Tag Name attribute = 'value'/}. For example, {Dede: field name = 'title'/} indicates the title of the document.

Path Problem in the module version: This site uses {Dede: Global name = 'cfg _ basehost'/}/templets/w3cpro/img/css.css, {Dede: global name = 'cfg _ basehost '/} indicates obtaining the website root directory. There is a template protection problem here. If you cherish your webpage template, you will separate the IMG directory so that others will not know your template directory.

Production
If you really create a template independently, it is very effort-consuming. planning, design, production, and debugging are very tiring. Many webmasters do not have the ability to make templates, so there are so many friends who want others to release templates. If they have the ability to copy others' templates, what is replication? Save the original HTML page, delete the body content, add the CMS code, and complete the process ., This is replication, there is no technical content, just add CMS code. In this way, I think there are still a lot of people who charge 100 to 200 people to create, and I can't see it. As a webmaster, I am too lazy. I don't even know the mark code of CMS, and I am really depressed about what other websites I have to do.

As far as the template is concerned, many webmasters only see the design, that is, the page looks good, but not the webpage creation, that is, the page code. This is a very wrong idea. Although good-looking web pages are important, web page creation is more important for our webmaster. The quality of Web code is related to search engine Seo and website maintainability. For our webmaster, the website can be concise and generous, the key is that websites are conducive to search engine search, which can create more profits and make more money.

A huge copy of the articles in the world depends on whether you will copy them. Making templates is the same as writing articles, it depends on whether you will copy them. My design level is poor and I don't want to stream it at all. I only write web code. Since the design won't do that, it will be like it. If it is an infringement to take a webpage, it will take three or four webpages and combine them into their own websites.

The process uses this site as an example: After planning the website structure, we decided to use the blue and green colors as the dominant color of the webpage. After finding the appropriate resources on the Internet, we began to combine the website in PS, after you are satisfied, write the code to create a webpage, and then add the Dede code for testing.

Installation and Use
The dede3.1release version enhances the system settings. You can set the template location in the system settings and place the template folder in templets. In the topic settings, {style} represents the template folder location, as shown in.

Instance
The following provides examples of this site for your reference. The page creation is not complex and is suitable for your learning and use.

A total of articles, images (using the article system) are created, and three system templates are downloaded. Other templates can be modified based on the provided page.

Index_in.html -- Home Page
List.html -- list page
Index_arc.html -- document page, download cover
Index_img.html -- image cover
List_img.html -- image list
Search.htm -- search page
Article.html -- Article Page
Article_down.html -- Download Page
Article_img.html -- Image
Modified file:

Inc_archives_view.php -- called separately in the next article in the previous article, which limits the topic of the article rather than the current full site.
Inc_arcpart_view.php -- change the link flink
Inc_channel_unit_functions.php -- call the arclist label to obtain the emergency solution for the articles in this topic.
Inc_functions.php -- modify the title of the jump prompt page
Inc_vote.php -- vote for Modification
Added files:

To display the status after logging on to the system on the entire site, add several files to the member directory.

index_doo.php
index_login.php
login.html
config_g.php
logined. JS
templets/index_login.html
after downloading and placing it on the website templets, follow the settings above.

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.