Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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...Administration ...Administration ...Search child portal from parent portal?Search child portal from parent portal?
Previous
 
Next
New Post
12/11/2007 3:10 PM
 

My parent portal is xyz.com. Its child is xyz.com/technologies. On my homepage, I want a search box that says "Search technologies" and only searches the contents of the child portal. What's the best solution for this?

The content hasn't been poured yet, so if there's a way to search a part of a DNN site without using portals, that'll work, too.

Thanks!

Stacy

 
New Post
12/11/2007 9:03 PM
 

There is a module (a few) that implement google custom search/ vertical search.  you could point the google search at you child portals

look at http://www.snowcovered.com/snowcovered2/Default.aspx?tabid=242&PackageID=7967

 
New Post
8/15/2008 8:23 AM
 

I also want to be able to search child portals from anywhere in either the parent or any of the children.  I think the best way to do this is to change the stored procedure in the SQL database.  You could do this with SQL Server Magement Studio quite simply by changing the WHERE clause.  I just added the following: "Or (t.PortalID >=1)".  This assumes your parent portal is 0.  The new stored procedure is:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

ALTER procedure [dbo].[GetSearchResults]
    @PortalID int,
    @Word nVarChar(100)
AS
SELECT si.SearchItemID,
    sw.Word,
    siw.Occurrences,
    siw.Occurrences + 1000 as Relevance,
    m.ModuleID,
    tm.TabID,
    si.Title,
    si.Description,
    si.Author,
    si.PubDate,
    si.SearchKey,
    si.Guid,
    si.ImageFileId,
    u.FirstName + ' ' + u.LastName As AuthorName,
    m.PortalId
FROM    dbo.SearchWord sw
    INNER JOIN dbo.SearchItemWord siw ON sw.SearchWordsID = siw.SearchWordsID
    INNER JOIN dbo.SearchItem si ON siw.SearchItemID = si.SearchItemID
    INNER JOIN dbo.Modules m ON si.ModuleId = m.ModuleID
    LEFT OUTER JOIN dbo.TabModules tm ON si.ModuleId = tm.ModuleID
    INNER JOIN dbo.Tabs t ON tm.TabID = t.TabID
    LEFT OUTER JOIN dbo.Users u ON si.Author = u.UserID
WHERE   (((m.StartDate Is Null) OR (GetDate() > m.StartDate)) AND ((m.EndDate Is Null) OR (GetDate() < m.EndDate)))
    AND (((t.StartDate Is Null) OR (GetDate() > t.StartDate)) AND ((t.EndDate Is Null) OR (GetDate() < t.EndDate)))
    AND (sw.Word = @Word)
    AND (t.IsDeleted = 0)
    AND (m.IsDeleted = 0)
    AND (t.PortalID = @PortalID) Or (t.PortalID >=1)
ORDER BY Relevance DESC
 

After you execute this, the search results are returned from your parent portal (0) and all child sites - assuming you have just created child sites and not a mixture of child and parent sites on your portal.

 
New Post
8/15/2008 8:26 AM
 

I forgot to include the fact that I changed the dbo.GetSearchResults stored procedure.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Search child portal from parent portal?Search child portal from parent portal?


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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out