Table of Contents
[field:title/]" >[field:title/]
Home Backend Development PHP Tutorial 求修改dedecms主页的方法?解决方案

求修改dedecms主页的方法?解决方案

Jun 13, 2016 am 10:04 AM
dedecms gt lt quot

求修改dedecms主页的方法?
个人不喜欢dedecms默认的主页布局,在网上看到一个比较好的模板,但不知道该怎么替换。而且让新模板中的链接换成我需要的。有知道的朋友给个思路吧。越详细越好,谢谢!

------解决方案--------------------

探讨
个人不喜欢dedecms默认的主页布局,在网上看到一个比较好的模板,但不知道该怎么替换。而且让新模板中的链接换成我需要的。有知道的朋友给个思路吧。越详细越好,谢谢!

------解决方案--------------------
织梦dedeCMS修改列表的显示条数 »织梦dedeCMS修改首页头条的技巧方法大全


1. 为 首页头条 加背景图
在 \templets\style\page.css 里找到:

.index .bignews .onenews{
padding:8px 12px;
border-bottom:1px solid #EBEBEB;

修改为:
.index .bignews .onenews{
padding:8px 12px;
background:url(../images/bignews_bg.gif) top center no-repeat; //这里就是加背景图的地方,根据美观情况,可以稍微调一下padding
border-bottom:1px solid #EBEBEB;


2、首页头条 字体居中:
在 \templets\default\index.html 里
找到

[field:title/]


修改为

[field:title/]

就可以居中了


3、首页头条的标题长度:
打开 index.htm
找到如下内容:


{dede:arclist flag='h' limit='0,1'}

[field:title/]


[field:description/]...[查看全文]


{/dede:arclist}



找到这行:{dede:arclist flag='h' limit='0,1'}
在里面加如: titlelen='你想要的数字' 如我想要显示20个汉字,即加如: titlelen='40'
即为:{dede:arclist titlelen='40' flag='h' limit='0,1'}
每2个字符等于1个汉字!


4、主页头条上方加420X60的广告:
在index.htm模板里找到此代码,




这里插入广告代码,你可以使用div以方便定位
------解决方案--------------------
在\dedecms\templets\default这个是织梦默认模板文件

登录后台之后,点击左侧"系统"

系统->站点设置->模板默认风格
具体如何修改织梦模板标签,不是三言两语可以说清楚的,到官方去找帮助文档吧
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

Fix: Snipping tool not working in Windows 11 Fix: Snipping tool not working in Windows 11 Aug 24, 2023 am 09:48 AM

Why Snipping Tool Not Working on Windows 11 Understanding the root cause of the problem can help find the right solution. Here are the top reasons why the Snipping Tool might not be working properly: Focus Assistant is On: This prevents the Snipping Tool from opening. Corrupted application: If the snipping tool crashes on launch, it might be corrupted. Outdated graphics drivers: Incompatible drivers may interfere with the snipping tool. Interference from other applications: Other running applications may conflict with the Snipping Tool. Certificate has expired: An error during the upgrade process may cause this issu simple solution. These are suitable for most users and do not require any special technical knowledge. 1. Update Windows and Microsoft Store apps

Where is the imperial cms resource network template? Where is the imperial cms resource network template? Apr 17, 2024 am 10:00 AM

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

How dedecms implements template replacement How dedecms implements template replacement Apr 16, 2024 pm 12:12 PM

Template replacement can be implemented in Dedecms through the following steps: modify the global.cfg file and set the required language pack. Modify the taglib.inc.php hook file and add support for language suffix template files. Create a new template file with a language suffix and modify the required content. Clear Dedecms cache.

What website can dedecms do? What website can dedecms do? Apr 16, 2024 pm 12:24 PM

Dedecms is an open source CMS that can be used to create various types of websites, including: news websites, blogs, e-commerce websites, forums and community websites, educational websites, portals, other types of websites (such as corporate websites, personal websites, photo album websites, video sharing website)

How to upload local videos to dedecms How to upload local videos to dedecms Apr 16, 2024 pm 12:39 PM

How to upload local videos using Dedecms? Prepare the video file in a format that is supported by Dedecms. Log in to the Dedecms management backend and create a new video category. Upload video files on the video management page, fill in the relevant information and select the video category. To embed a video while editing an article, enter the file name of the uploaded video and adjust its dimensions.

How to use dedecms How to use dedecms Apr 16, 2024 pm 12:15 PM

Dedecms is an open source Chinese CMS system that provides content management, template system and security protection. The specific usage includes the following steps: 1. Install Dedecms. 2. Configure the database. 3. Log in to the management interface. 4. Create content. 5. Set up the template. 6. Manage users. 7. Maintain the system.

What loopholes does dedecms have? What loopholes does dedecms have? Aug 03, 2023 pm 03:56 PM

DedeCMS is an open source content management system that has some potential vulnerabilities and security risks: 1. SQL injection vulnerability. Attackers can perform unauthorized operations or obtain sensitive data by constructing malicious SQL query statements; 2. File Upload vulnerability, attackers can upload files containing malicious code to the server to execute arbitrary code or obtain server permissions; 3. Sensitive information leakage; 4. Unauthenticated vulnerability exploitation.

See all articles