How to call custom fields on DreamWeaver CMS search results page
1: Find and open the extend.func.php file in the include directory, and add the following code at the end of the file: cms)
function Search_addfields($id,$result){ global $dsql; $dedejs = $dsql->GetOne("SELECT * FROM `dede_addonsoft` where aid='$id'"); $name=$dedejs[$result]; return $name; }Among them, addosoft is an additional table to call the custom field. You can see it in the DreamWeaver backend core->Channel Model->Content Model Management. The software model is generally addonsoft. Ordinary articles are generally addonarticles. This can be changed according to specific needs. Others do not need to be modified.
2: Next, find and open the arc.searchview.class.php file in the include directory, search for "//Processing some special fields", and add the following code below:
$row["softsize"]=Search_addfields($row["id"],"softsize");The softsize is the field name of the software size. If there are multiple custom fields, add multiple lines, but the softsize must be changed to the field name. After adding it, it is completed. The last step is to call it in the search template. Use the [field:softsize/] tag in search.htm to call the software size
The above is the detailed content of How to call custom fields on DreamWeaver CMS search results page. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version
God-level code editing software (SublimeText3)