Home > CMS Tutorial > DEDECMS > How to modify the list of special articles in the DreamWeaver article system

How to modify the list of special articles in the DreamWeaver article system

藏色散人
Release: 2019-12-27 09:06:23
Original
2224 people have browsed it

How to modify the list of special articles in the DreamWeaver article system

How to modify the list of special articles in the Dreamweaver article system?

The template creation method of the article list is as follows

Recommended learning: Dreamweavercms

If no special settings are made, the article list display of the topic will use the article_spec.htm file under default as the template by default.

This template file is very simple. The front is some information about the topic, and the following is the dividing line. Below the dividing line are the modules of actual nodes and node articles.

Logically speaking, this module should be the most important content of the topic template, but it only has the following lines:

{dede:field.note/} 
< /div>
Copy after login

It is really unexpected - how can I change this, even the html tags None can be seen. Although I am dissatisfied, since I have used dedecms, this is the only way. Maybe the author hopes to reduce the user's workload, which is understandable.

To flexibly modify the style of displaying node articles on this page, I thought of two methods:

View the html code directly when the browser displays the page.

No matter how you do it in the background, what is displayed on the browser is the final result. So I only need to look at your final HTML code, check which HTML elements are used, and write the CSS of the relevant elements in the style sheet. There is a little trick here. You can easily complete this task using firebug of firefox. As for how to use it, I won’t explain it here. You can directly use Baidu.

Node name

Node article list

After knowing this, it should not be difficult to modify the style.

Although the appeal method is not troublesome, it always feels inflexible. Then let’s look at the source code directly and modify it as we like.

The php file that handles the topic call tag {dede:field.note/} is include/taglib/channel/specialtopic.lib.php.

Find the fifth line of the ch_specialtopic() function

$tempStr = GetSysTemplets(&#39;channel_spec_note.htm&#39;);
Copy after login

From here you can see that the channel_spec_note.htm file determines the display of nodes and node articles.

The channel_spec_note.htm file is placed in the system template file templets/system/channel_spec_note.htm

When we open the file, we find that the html code inside is almost exactly the same as the one viewed in the browser:

~notename~

~spec_arclist~

In actual operation, notename will be replaced with the node name, ~spec_arclist~

will be replaced with the node article super Link. ~spec_arclist~ is actually a string: in the form of

Article Hyperlink

Finding this file can modify all html elements except li, but we still cannot add classes to li and id.

The above is the detailed content of How to modify the list of special articles in the DreamWeaver article system. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template