Home > CMS Tutorial > DEDECMS > body text

How to use DreamWeaver to create a personal blog

(*-*)浩
Release: 2019-11-07 14:30:50
Original
3181 people have browsed it

Sometimes we hope to make Dreamweaver a personal blog system, but now let me show you that Dreamweaver is not suitable for a personal blog if you don’t modify it.

How to use DreamWeaver to create a personal blog

#The homepage of the blog is a list of articles, which requires page turning. However, the Dreamweaver homepage does not have this function. But Dreamweaver’s list has this function.

As long as we fix the homepage, DreamWeaver will basically become a personal blog system. (Recommended learning: dedecms tutorial)

Now here are two methods.

First, create a top-level column as your blog homepage list. Find what the ID of the column is.

Find the list.php file in the plus directory, copy it to the root directory of the website, delete the original index.php.

Name list.php as index.php, Open list.php with an editor.

Found:

require_once(dirname(__FILE__)."/../include/common.inc.php");
//$t1 = ExecTime();
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0);
$channelid = (isset($channelid) && is_numeric($channelid) ? $channelid : 0);
Copy after login

Modify to:

require_once (dirname(__FILE__) . "/include/common.inc.php");
$tid=1;//(这里说明一下1就是你创建的顶级栏目的ID)
$channelid =1;//(调用的内容模型为普通文章)
Copy after login

Enter your access URL, and you will see the list content appear, and your blog has been successfully established.

The first method is suitable for situations where there is only one top-level column, and the access is dynamic browsing. Once there are many accesses, the number of queries to the database will inevitably increase, and the load on the server will be greater.

If there are multiple top-level columns and you want to use static browsing, you can only use the second method.

The second method.

Use the free list function of DreamWeaver.

The above is the detailed content of How to use DreamWeaver to create a personal blog. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!