Forum

HomeHomeCoreCoreSamples and oth...Samples and oth...OWS - HUMAN FRIENDLY MENU, BREADCRUMB & SITEMAP EXAMPLEOWS - HUMAN FRIENDLY MENU, BREADCRUMB & SITEMAP EXAMPLE
Previous
 
Next
New Post
12/12/2008 1:36 AM
 

Why don't people use [ObjectQualifier,System] when referring to DNN tables?

Is there a problem using this, or any reason it shouldn't be used?

I've tried modifying the query with this - maybe missed something or not done it right but the Sitemap one isn't showing anything for me.

Modified:

declare @UserID int,@bIsSuper bit
set @userID = [UserID,System]
SELECT @bIsSuper = IsSuperUser FROM [ObjectQualifier,System]Users WHERE UserID = @UserID
SELECT TabOrder, TabName, TabID, [Level], dbo.ReWriteURL(url,tabid) as NewURL
FROM [ObjectQualifier,System]Tabs AS t where tabid IN
(
SELECT DISTINCT x.tabid from [ObjectQualifier,System]tabs x INNER JOIN TabPermission TP ON x.TabID = TP.TabID
INNER JOIN [ObjectQualifier,System]Permission P ON TP.PermissionID = P.PermissionID
LEFT JOIN (SELECT @UserID AS UserID, -1 AS RoleID UNION SELECT @UserID, RoleID FROM [ObjectQualifier,System]UserRoles WHERE UserID = @UserID) UR ON TP.RoleID = UR.RoleID
WHERE x.IsVisible = 1 AND x.IsDeleted = 0 and x.portalid=[portalid,system] and x.taborder<10001
AND P.PermissionCode = 'SYSTEM_TAB' AND P.PermissionKey = 'VIEW'
AND ( UR.UserID = @UserID OR @bIsSuper = 1 )
)
ORDER BY TabOrder

 

New Post
12/12/2008 4:26 PM
 

You missed a table in the join:

declare @UserID int,@bIsSuper bit
set @userID = [UserID,System]
SELECT @bIsSuper = IsSuperUser FROM [ObjectQualifier,System]Users WHERE UserID = @UserID
SELECT TabOrder, TabName, TabID, [Level], dbo.ReWriteURL(url,tabid) as NewURL
FROM [ObjectQualifier,System]Tabs AS t where tabid IN
(
SELECT DISTINCT x.tabid from [ObjectQualifier,System]tabs x INNER JOIN
[ObjectQualifier,System]TabPermission TP ON x.TabID = TP.TabID
INNER JOIN [ObjectQualifier,System]Permission P ON TP.PermissionID = P.PermissionID
LEFT JOIN (SELECT @UserID AS UserID, -1 AS RoleID UNION SELECT @UserID, RoleID FROM [ObjectQualifier,System]UserRoles WHERE UserID = @UserID) UR ON TP.RoleID = UR.RoleID
WHERE x.IsVisible = 1 AND x.IsDeleted = 0 and x.portalid=[portalid,system] and x.taborder<10001
AND P.PermissionCode = 'SYSTEM_TAB' AND P.PermissionKey = 'VIEW'
AND ( UR.UserID = @UserID OR @bIsSuper = 1 )
)
ORDER BY TabOrder


Kevin M Schreiner
Open Web Studio
New Post
12/12/2008 10:31 PM
 

Thanks for that.

I also realise after that I have to change the SQL scripts (2 of the 3 anyway)... forgot about those.

Cheers

David

New Post
4/15/2009 12:50 PM
 

I just installed this on my site. the root menu works a treat but the child menu nav doesn't display anything. I checked the logs and there are not any errors being displayed. I did change @qry varchar(max) to @qry varchar(8000) because I was getting an error on the max. Could that have broken it?

New Post
8/27/2012 2:59 PM
 
The .zip file link is no longer valid. This thread should be updated or removed.
Previous
 
Next
HomeHomeCoreCoreSamples and oth...Samples and oth...OWS - HUMAN FRIENDLY MENU, BREADCRUMB & SITEMAP EXAMPLEOWS - HUMAN FRIENDLY MENU, BREADCRUMB & SITEMAP EXAMPLE


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share