Need Help For Trigger
Last Post 11 Feb 2010 10:46 AM by idumlupinar. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
idumlupinar
New Member
New Member
Posts:3


--
08 Feb 2010 12:34 PM  
Hello guys, for some good purpose, i have edited tabpath column of rows under Tabs table.
Well, lets say i have page named Computer Gurus,
default tabpath for this page is //ComputerGurus
i modified it to //computer-gurus

Although it does work, if me or another person who has access to Page Settings can destroy everything
Because after an upgrade, tabpath simply reverts back to //ComputerGurus

So i need some trigger to lock tabpath,

You can say, "HOLD ON, Tabpath is generated from Tab Title".
Well, i am very well know that but i just don't want to user to change TabPath.

In my scenario, when needed i can update Tabpath directly from database table.
Or i would appreciate if you could share me a query to do that from HOST > SQL

Basically i need two scripts:
1) A query to change tabpath of a certain tab (maybe we can use tabid at query since it is unique)
2) A trigger to lock tabpath during a page settings update.

I can also hear feedback about negative results of this task.

Thank you for your help
Mitchel Sellers
Site Moderator
Basic Member
Basic Member
Posts:328


--
08 Feb 2010 12:41 PM  
Ismet,

I assume that you are trying to manipulate the tab-path values to modify the behavior of the generated FriendlyUrls, is this correct? If so, before reading on, have you looked at UrlMaster from Ifinity? It manages to make changes without messing with the core data.

Otherwise, to accomplish your goal, what you can do is something like this. Create a trigger that is specified as "AFTER UPDATE" From here you can query the old data and the new data. If the new data has a modified tabpath, you can simply run an update to change it. HOWEVER, keep in mind that this is a core change, and more than likely could cause major disruptions in functionality should a person modify a page name in a way that greatly changes the page structure.

-Mitchel Sellers, Microsoft C# MVP, MCITP
CEO
IowaComputerGurus Inc!

Visit my blog for helpful technical articles

For recommended products and services view the links to the right.
idumlupinar
New Member
New Member
Posts:3


--
10 Feb 2010 10:12 AM  
Mitch, you are absolutely right, i do this for friendly urls.
As you recommended, i already tried URL Master, i also was ready to purchase it.
However, it didn't work with my custom locale (this is the headache for Turkish webmasters)
So i had to modify tabpath by my way.

Le'ts say i my page is Turkish Companies
default tabpath would be: //TurkishCompanies
i modifed this to //turkish-firms (note that i changed companies word to something else)

When user goes to Tab Settings and clicks on Update button (even he does not change anything) tabpath will revert back to //TurkishCompanies.
I don't want this happen.

However, this trick should not affect someone to create a new page.


I only modified a few pages, (home, blog, business directory and search results)
Can you tell me complete query?
Mitchel Sellers
Site Moderator
Basic Member
Basic Member
Posts:328


--
10 Feb 2010 10:40 AM  
What I gave you above should get you close.

I would have to setup a test environment to test and build out a solution.
-Mitchel Sellers, Microsoft C# MVP, MCITP
CEO
IowaComputerGurus Inc!

Visit my blog for helpful technical articles

For recommended products and services view the links to the right.
idumlupinar
New Member
New Member
Posts:3


--
11 Feb 2010 10:46 AM  
Mitch, would you help me, if i would setup that test environment for you?
You are not authorized to post a reply.

Active Forums 4.0
NOT LICENSED FOR PRODUCTION USE
www.activemodules.com

 

Click to verify BBB accreditation and to see a BBB report.

 

Microsoft Certified Partner