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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Friendly urls spaces.Friendly urls spaces.
Previous
 
Next
New Post
9/27/2013 3:39 PM
 
Hi
I created a function and a trigger to solve this problem you can use the fallowing script in dnn6 I don't know if it working for dnn7 or not. you can use any character in line 14 of the code.

let me know if it worked for you 

here is link of the site witch is used this script in http://mahpar.ir


create function fnGenerateTabPath
(@tabId int)
returns nvarchar(255)
as
begin
declare @path nvarchar(255)
set @path=''
if(exists(select * from Tabs where ParentID is not null and TabID=@tabid))
begin
declare @parentid int
set @parentid=(select ParentID from Tabs where TabID=@tabid)
set @path=dbo.fnGenerateTabPath(@parentid)
end
set @path=@path+'//'+(select replace(tabname,' ','-') from Tabs where TabID=@tabid)
return @path
end
GO
CREATE TRIGGER [dbo].[trigUpdateTabPath]
   ON  [dbo].[Tabs]
   AFTER INSERT,UPDATE
AS 
BEGIN
declare @tabid int
set @tabid=(select max(TabID) from inserted)
UPDATE Tabs SET TabPath=dbo.fngeneratetabpath(@tabid) where Tabs.TabID=@tabid
END  
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Friendly urls spaces.Friendly urls spaces.


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