+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / Generic Content Find and Replace

Generic Content Find and Replace

8 posts, 0 answered
  1. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    11 May 2007
    Link to this post
    I don't know if there is much of a demand for this. However, I came accross a scenario where it would be cool to do a global find and replace to change urls throughout a site.

    Sincerely,

    Ben
  2. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    11 May 2007
    Link to this post
    This script worked great for this:

    UPDATE    sf_CmsControlProperty  
    SET              Value = REPLACE(Value, '/VirtualDirectory/''/')  
    WHERE     (Value LIKE '%/VirtualDirectory/%'

    Perhaps this will help someone.

    Sincerely,

    Ben
  3. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    14 May 2007
    Link to this post
    Oh yes but don't forget the Shared Content you must also run:

    UPDATE    sf_CmsTextContent  
    SET              Content = REPLACE(Content, '/VirtualDirectory/''/')  
    WHERE     (Content LIKE '%/VirtualDirectory/%'

    Hope that helps,

    Ben
  4. rmp
    rmp avatar
    13 posts
    Registered:
    26 Jun 2007
    13 Jul 2007
    Link to this post

    Thanks for the post Ben.

    Can anybody help me come up with a SQL query that will find the most recent versions (i.e. Live) of controls in the sf_CmsControlProperty table?

    I'm having trouble knowing which versions of files I'm looking at, and I'd like to keep the history intact.

    Thanks!


  5. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    16 Jul 2007
    Link to this post
    Hello Mark,

    Here is the SQL statement:
    SELECT * FROM sf_CmsControlProperty  
    INNER JOIN sf_CmsCtrlLinks   
      ON sf_CmsControlProperty.ControlID = sf_CmsCtrlLinks.ControlID  
     

    sf_CmsCtrlLinks is the table that makes many-to-many relation to live pages. Relations to history are kept in table sf_StagedCtrlLinks.

    Sitefinity currently does not make use of many-to-many relation between pages and controls but this is planed for future features. When dropping a control on a page you will be able to specify it as reference to a control form other page instead of creating new instance.

    I hope this helps. Don’t hesitate to ask if you need further information.

    Best wishes,
    Bob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. rmp
    rmp avatar
    13 posts
    Registered:
    26 Jun 2007
    16 Jul 2007
    Link to this post
    Thanks Bob - that was what I needed.
  7. Zyad Rujeedawa
    Zyad Rujeedawa avatar
    31 posts
    Registered:
    18 Feb 2010
    12 Aug 2010
    Link to this post
    Hello,

    Has this changed since in the latest sitefinity version ?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    30 Sep 2016
    12 Aug 2010
    Link to this post
    Hi Zyad Rujeedawa,

    The latest version of Sitefinity is 4.0 edition, where control properties are stored in [sf_control_properties]. The above post made by Bob is valid if you use Sitefinity 3.7.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
8 posts, 0 answered