New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Customizing Search Results, Show Page Name vs Module TitleCustomizing Search Results, Show Page Name vs Module Title
Previous
 
Next
New Post
7/12/2010 4:50 AM
 
I was hoping to find out how to show the Page Name vs. the Module Title in the Search Results. I have a very large site and some Modules did not get titled. Therefore some of my search results look like

Text/HTML
The Endow Partnership, a program of Endow San Diego, was developed to support and encourage nonprof...
http://www.sdfoundation.org/CivicLead... - 6/26/2010 8:29:35 PM

When I want them to look like

Endow Partnership Program
The Endow Partnership, a program of Endow San Diego, was developed to support and encourage nonprof...
http://www.sdfoundation.org/CivicLead... - 6/26/2010 8:29:35 PM

I can not go through the entire site and name all my modules as it is too big. I was able to remove the Relevance code from SearchResults.aspx and I think I see the area where I should replace module title with page title but I need assistance on the exact code to find and replace. Thank you in advance for any advice.
 
New Post
1/26/2012 2:25 PM
 
Is there an answer for this?  Even after updating the Module Title, the search results display "Text/HTML" rather than the updated module title.  I can't imagine any scenario where you would want the module name rather than the page name in the search results.  Why has this post not been answered?
 
New Post
1/26/2012 2:51 PM
 
If you want more control, you either need DNN professional or you could try Avatar Search Boost (not free).
The core search in CE is quite limited, there are not a lot of settings to control it's behaviour.
 
New Post
12/5/2012 10:16 AM
 
I've got the same problem. Isn't there a string like

Text='<%# DataBinder.Eval(Page.Container.DataItem, "Title") %>'
that would display the title of the item's page?

 
New Post
4/23/2013 7:09 PM
 

I'm a bit blown away by the response to this question. I was trying to use the search results feature until I also realized, what I consider, a bad idea of using the module title instead of the page title on results. However, I then noticed that if you have two HTML Modules on a page, it returns that page twice! This seemed like a bad idea, as well. Kind of ruined the point of the relevancy, I would think.

Anyway, while looking into it, I found this view in the database: vw_SearchItems

This view seems to be part of what DNN uses to feed their search results. I didn't go into too much depth in figuring out the ins and outs of this view or what it gets its data (it seems a lot of it has to do with some kind of stored procedures). 

At first, I thought about altering the view to just pull in a Tab-Name, but I'm not sure if updating DNN would overwrite my change. So, I decided to just make my own custom module for search results using their Search Items table. I'm not sure if this is an amazing idea or not, but it seems to be working for now. 

This query should work just find if you have SQL 2008;

SELECT     TabName, TabID, TabPath,
Text = Stuff((SELECT '' + [Description]
FROM         vw_SearchItems WHERE vw_SearchItems.TabID = Tabs.TabID FOR XML PATH('')),1,0,'') 
FROM         Tabs WHERE (Stuff((SELECT '' + [Description]
FROM         vw_SearchItems WHERE vw_SearchItems.TabID = Tabs.TabID FOR XML PATH('')),1,0,'')) IS not null
AND IsDeleted = 0 AND IsVisible = 1 AND IsSecure = 0 AND EndDate >= GETDATE() AND StartDate <= GETDATE()
AND PortalID = 0

PortalID can, of course, be changed. Also, this was done with DNN7.

If anyone has any other input on this query or another way to approach this, I'd love to hear it.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Customizing Search Results, Show Page Name vs Module TitleCustomizing Search Results, Show Page Name vs Module Title


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.