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...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
4/24/2013 2:59 AM
 
Villanea wrote:

.... 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.

 That's exact;y the way to solve this when you don't like the way the core is handling things. Although it's difficult to compete with the options of the commercial search solution I posted before.

 
New Post
4/24/2013 11:01 AM
 

Alright, thank you for clarifying that. I guess what bugged me about the original response was that it came across as, "No, you can't do it unless you buy this module, or buy professional edition." I mean, it couldn't be so hard to tell us about the vw_SearchItems view, or maybe some particulars about it, could it?

Anyway, I guess it was just me taking your response the wrong way; I do have one question, though. Is this vw_SearchItems view something that can be reliably referenced? I realize it's difficult for you to say, "No, this view will never be changed!" but at least if it's regularly altered with updates, or if a known change is coming to it?

Otherwise, should we just be talking to the tables directly, instead, and make our own view?

 
New Post
4/24/2013 1:22 PM
 

I can't figure out how to edit posts... so I'm just going to post another for this.

I've written a few of new views that can be used for this now. Since modules are able to use their own views, I assume this will work the best

In total, I wrote three views that allow me to content on my website. Unfortunately, I didn't utilize the resources in place by DNN to use their search Relevance logic.

View 1: vw_SearchItemsByTabID

SELECT     dbo.ContentItems.TabID, dbo.SearchItem.Description AS [Content]
FROM         dbo.ContentItems INNER JOIN
                      dbo.SearchItem ON dbo.ContentItems.ModuleID = dbo.SearchItem.ModuleId

View 2: vw_TabsWithDetailsAndSearchableContent
(Because of the XML Path and Stuff functions, this one does not validate well within a Query Designer, but it works if you ignore errors and execute.)

SELECT     dbo.Tabs.TabName, dbo.Tabs.TabID, dbo.Tabs.TabPath, dbo.Tabs.Description, dbo.Tabs.KeyWords, dbo.Tabs.DisableLink, dbo.Tabs.IsDeleted, dbo.Tabs.PortalID, dbo.Tabs.StartDate, 
                      dbo.Tabs.EndDate, dbo.Tabs.IsSecure, dbo.Tabs.IsVisible, dbo.Tabs.Title, dbo.Tabs.ParentId, dbo.TabPermission.RoleID, dbo.TabPermission.AllowAccess, dbo.TabPermission.PermissionID, (Stuff((SELECT CAST([Content] As Nvarchar(max)) FROM [vw_SearchItemsByTabID] WHERE [vw_SearchItemsByTabID].TabID = tabs.TabID FOR XML PATH('')),1,0,'')) AS TabContent
FROM         dbo.Tabs INNER JOIN
                      dbo.TabPermission ON dbo.Tabs.TabID = dbo.TabPermission.TabID

View 3: vw_PublicTabsWithSearchableContent
(This one uses some flags built into DNN to only show publicly visible pages. Really, the biggest thing is the AllowAccess, RoleID, and PermissionID fields.)

SELECT     TabID, PortalID, TabPath, TabName, Title, KeyWords, Description, TabContent,
FROM         dbo.vw_TabsWithDetailsAndSearchableContent
WHERE     (DisableLink = 0) AND (IsDeleted = 0) AND (StartDate >= GETDATE()) AND (EndDate <= GETDATE()) AND (IsSecure = 0) AND (IsVisible = 1) AND (AllowAccess = 1) AND 
                      (RoleID = - 1) AND (PermissionID = 3) OR
                      (DisableLink = 0) AND (IsDeleted = 0) AND (StartDate IS NULL) AND (EndDate IS NULL) AND (IsSecure = 0) AND (IsVisible = 1) AND (AllowAccess = 1) AND (RoleID = - 1) 
                      AND (PermissionID = 3)

This is mostly a bunch of guess work on my behalf, so I will not claim that this works for everyone or is a viable solution for all situations. It does work for me, though, and I hope it can at least help someone get on a good track for their own needs.

 
New Post
4/25/2013 3:02 AM
 
Villanite wrote:

Alright, thank you for clarifying that. I guess what bugged me about the original response was that it came across as, "No, you can't do it unless you buy this module, or buy professional edition." I mean, it couldn't be so hard to tell us about the vw_SearchItems view, or maybe some particulars about it, could it

I posted that because you posted your question in the Skins forum.

In principle anything in DNN can be customised by creating your own version of a  module but 99% of the people posting in this forum don't have any ASP.NET / SQL skills. But I should have read your first question more precise and point you to the development forum.
  :-)

 
New Post
4/25/2013 4:22 AM
 
@Villanite - the general guidance is that you should avoid going direct to tables.

Ok now that is out of the way what is the reality? In many places there are decent API's that allow you access to the data you want. Perfect. In others there are not.

Of course it is ultimately your web site, and your code, so you can do anything you want with it. Generally the closer you get to the tables the higher the chance that a future update will break your module.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out