Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report