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

Forums / General Discussions / is there an OnDropControl event

is there an OnDropControl event

7 posts, 0 answered
  1. Phil
    Phil avatar
    89 posts
    Registered:
    19 Oct 2010
    03 Nov 2010
    Link to this post
    We are using SF 4.0 Beta 2
    We want to present users a very limited edit-a-page-screen, so that they can create pages, but only pages that conform to a set of rules.  For example, we want to restrict which controls they can drop into a given Drag-widgets-here box.  How can I do this?

    I guess I need an event to handle(?).  My best guess right now is to create a custom layout control and handle the onmouseout event, to check the content of the particular div in the layout control.  I have a feeling that there is a much better way to do this.  Thank you.

    Create custom layout control in SF documentation
    http://www.sitefinity.com/40/help/developer-manual/pages-layouts-creating-layout-controls.html
  2. Phil
    Phil avatar
    89 posts
    Registered:
    19 Oct 2010
    04 Nov 2010
    Link to this post
    The custom layout control was not the way to go.

    I have created a template with javascript in one of the content place holders, which runs on the onmouseout event.  So when I use the template in the UI, I drop a widget in the part of the template w the js in it and my function runs.  I just dont want to spend time on this if there is a better way to do it.

    Again:
    We want to restrict which controls they can drop into a given Drag-widgets-here box.  How can I do this?

    Please advise.  Thanks.
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 May 2017
    04 Nov 2010
    Link to this post
    Hello Phillip,

    You can do this working with user/role policy. You can set which widgets will be available for the policy that this user/role will use.

    Kind regards,
    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
  4. Phil
    Phil avatar
    89 posts
    Registered:
    19 Oct 2010
    04 Nov 2010
    Link to this post
    Thank you very much for your response, but I dont think what you describe is enough control for what I want to achieve.  We want to restrict which controls they can drop into a given Drag-widgets-here box.

    Let me try to explain a little better.  Let's say I have a template with 3 content place holders: Left, Center, and Right.  And I have three widgets: A, B, and C.

    I want to be able to allow widget A to be dropped in Center, but never in Left or Right

    Thanks again.
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 May 2017
    04 Nov 2010
    Link to this post
    Hi Phillip,

    We do not support this type of permissions. You can

    1. Restrict on which ContentPlaceHolder you can drop/delete/ move widgets
    2. You can define which widget will be dropped on a page.

    Kind regards,
    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
  6. Phil
    Phil avatar
    89 posts
    Registered:
    19 Oct 2010
    04 Nov 2010
    Link to this post
    OK.  I understand.

    Can you point me to SF documentation regarding the two approaches you just mentioned.  Then I'm good to go.  :-)

    Thanks again.
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 May 2017
    05 Nov 2010
    Link to this post
    Hello Phillip,

    To restrict on which holder you can drop a control you have to use Sitefinity's layouts. Once you drop a control you can choose "Permissions" from "More" option. Please take a look at the attached screenshot(permissionslayouts.png). On the next window there is a permission option "Drop widgets or layout elements"

    You should perform the same steps if you want to make restrictions on widget level. Each widget has a "More" option where you can go to its "Permissions"

    And the second option is working with policy. You can set different policy per role or user. The policy works with configurations and this allow you to have different configuration per role or user. When you go to Settings you can delete or create Config elements, but you cannot set permissions on these elements. You can take a look at policysetup.png

    Sincerely yours,
    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
7 posts, 0 answered