Solved

Remove Fields From Search Results Page?

Posted on 2013-05-30
1
298 Views
Last Modified: 2013-06-19
(I'm using the OpenPublic distro)

I need to remove the Author, Date and Time fields from my search results page.

Best way?
0
Comment
Question by:sandshakimi
1 Comment
 
LVL 9

Accepted Solution

by:
scifikillr earned 500 total points
ID: 39207875
There is a 'search-results.tpl.php' file that can be overridden within the theme. Search your codebase for this file (templates are usually in /modules/system or /modules/node, but I would search all of '/modules' for it.)

If you override this tpl file, you can manipate it to your heart's content. That includes the post info.

It's also quite likely that the default search-results template is returning node results in teaser form. If this is the default search module you're using, you'll have to override this in the template (by manually printing the fields you want, or removing the post info from the array before you retrieve it)

As an alternative, you could simply create a view with an exposed search filter, and then modify the view to return the fields you want, vs the default teaser.

As an additional alternative, you could simply modify the node teaser display, if you're not using it anywhere else. That can be done by navigating to the content type in question, and clicking "Manage Display" tab, then modifying the 'teaser' perspective.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Changing date format in a drupal template 3 399
Search Drupal Site 9 311
Creating a Drupla ecommerce website. 4 194
Restore Drupal Website from CPanel Full Backup 7 166
This article is for those that are having major problems with users upload files such as pictures to their profile. The solution is simple and has to do with correcting the directory paths. With some experimenting and testing i got it fixed. Note…
RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question