Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of displaying different templates according to Channel Model on Dream Weaving search result Page

Shulou Source: shulou.com Published: 2022-06-02 05:00:09 10月03日 Update

This article mainly introduces the method of weaving dream search results page to display different templates according to the channel model, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

How does the dream-weaving search results page display different templates by channel model?

Dream weaving DEDECMS search results page displays different templates by channel model

Recommended study: dream weaving cms

Idea: add a decision to the search box, such as displaying a template when searching for a software model and a template when searching for an article model.

1. Join in the head area

two。 Change the search code

News software search

The point is that

News software

The game model search 1 set here is the article model 3 is the software model

3. Copy serach.php and change its name to search_images.php

4. Open search_images.php

Require_once (DEDEINC. "/ arc.searchview.class.php"

Change to

Require_once (DEDEINC. "/ arc.searchimg.class.php"

5. Copy arc.searchview.class.php and change its name to arc.searchimg.class.php

6. Open arc.searchimg.class.php

Modify

$tempfile = $GLOBALS ['cfg_basedir']. $GLOBALS [' cfg_templets_dir']. "/". $GLOBALS ['cfg_df_style']. "/ search.htm"

For

$tempfile = $GLOBALS ['cfg_basedir']. $GLOBALS [' cfg_templets_dir']. "/". $GLOBALS ['cfg_df_style']. "/ search_images.htm"

The core modification is over, and the rest is free to play in the search_images.htm template. Similarly, it can also be achieved by column type search to display different styles of the results page.

Thank you for reading this article carefully. I hope it will be helpful for everyone to share the dream-weaving search results page and show different templates according to the channel model. At the same time, I also hope that you will support more, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Tags: Search models templates differences results channels search results software methods articles that is articles news time learning freedom code value content area Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Apple Xiaomi MySQL Linux