Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Ektron Find Replace In Menu

Posted on October 23, 2013October 26, 2015 By David Kittell

This script will rename menu link paths

SET XACT_ABORT ON

DECLARE @currval NVARCHAR(500)
DECLARE @newval NVARCHAR(500)
DECLARE @search NVARCHAR(500)
DECLARE @replace VARCHAR(500)

SET @search = '' --string to find
SET @replace = '' --replacement string

DECLARE @pos INT
DECLARE @id BIGINT

BEGIN TRAN

DECLARE curs CURSOR LOCAL FAST_FORWARD
FOR
SELECT mnu_id
	,item_link
FROM menu_to_item_tbl
WHERE item_link LIKE '%' + @search + '%'

OPEN curs

FETCH NEXT
FROM curs
INTO @id
	,@currval

WHILE @@fetch_status = 0
BEGIN
	--print 'Url before update=' + @currval
	SET @newval = replace(@currval, @search, @replace)

	UPDATE menu_to_item_tbl
	SET item_link = @newval
	WHERE mnu_id = @id

	PRINT 'Value after update=' + @newval

	FETCH NEXT
	FROM curs
	INTO @id
		,@currval
END

CLOSE curs

DEALLOCATE curs

--rollback tran
COMMIT TRAN

Source: http://www.skonet.com/Articles_Archive/Helpful_Sql_Scripts_for_Ektron_CMS_400_Net.aspx

Originally Posted on October 23, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Ektron MSSQL MSSQL - Ektron MSSQL - Ektron 8.0.2 SQL

Post navigation

Previous post
Next post

Related Posts

Ektron – Remove Content/Folder Permissions

Posted on August 20, 2014October 26, 2015

Use EXTREME caution on this query. I recommend you do a backup of your database before you run this script as this will remove all permissions that someone has setup on Ektron. TRUNCATE TABLE [permissions_tbl]; UPDATE [content] SET [inherit_permissions] = 0 ,[inherit_permissions_from] = 0 ,[private] = 0; Originally Posted on…

Read More

OpenSSL – Decode/Read CSR

Posted on January 5, 2018

Sometimes you when a SSL CSR isn’t named properly you need to get the details of it, the code below will help. Note: Depending on version and OS the placement numbers (-f5 for example) may be slightly off. #!/bin/sh # ReadSSLCSR.sh # # # Created by David Kittell on 1/5/18….

Read More

Ektron Upload File Into Library

Posted on February 18, 2015October 26, 2015

I found and modified code to create an Ektron Library File Upload function. This function allows some customization: Defined Folder ID In this code I manually set the folder ID but effectively you could have a drop down list of folders to select the folder (see DMS Widget) Content Title…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes