Home > Backend Development > PHP Tutorial > Detailed explanation of setting method of dedecms hidden column

Detailed explanation of setting method of dedecms hidden column

WBOY
Release: 2024-03-15 09:08:01
Original
436 people have browsed it

Detailed explanation of setting method of dedecms hidden column

"Detailed explanation of how to set up DedeCMS hidden columns, specific code examples are required"

In the process of using DedeCMS to build a website, sometimes we need to hide some columns. Site front-end display. This article will introduce in detail the setting method of DedeCMS hidden column and provide specific code examples.

1. Backend settings

First, we need to log in to the backend management system of DedeCMS. In the column management page, find the column that needs to be hidden, find the "Show in site navigation" option in the "Basic Properties" tab, and set it to "No".

2. Template file modification

Next, we need to modify the template file. The hidden columns will not be displayed in the front desk. This needs to be controlled by the template file. Find the corresponding column template file (usually located in /templets/template directory/column template file.htm), and add the following code to the file:

<dcc:channel typeid='栏目ID' showtype='开始位置,显示数量'>
    // 栏目内容展示代码
</dcc:channel>
Copy after login

In the above code, typeid is the ID of the hidden column, showtype is the display mode, which can be set according to needs. After adding the above code, save the file and update the template cache.

3. Front page display

After we complete the above settings, refresh the front page and find that the hidden columns are no longer displayed in the site navigation or page.

4. Other precautions

  • When modifying the template file, it is recommended to back up the original file to avoid errors that cannot be restored.
  • When you need to restore a hidden column, just change the setting in the first step to "Yes" to display the column in the front desk again.

Summary: Through the above setting method, we can easily hide the columns in DedeCMS that do not need to be displayed in the front desk. I hope the above content is helpful to you, and I wish you good luck in building your website!

The above is a detailed explanation of how to set up hidden columns in DedeCMS. I hope it will be helpful to you.

The above is the detailed content of Detailed explanation of setting method of dedecms hidden column. 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