More in this section

Forums / Developing with Sitefinity / stripped scripts

stripped scripts

3 posts, 0 answered
  1. Frank Nieto
    Frank Nieto avatar
    5 posts
    30 May 2010
    20 Jul 2010
    Link to this post
    First, let me start by stating that I understand that Genereic Content Control must have the AllowScript set to true.  I have done that.  Now, here is my problem...

    Adding a simple alert box in a page works fine.  If I do the same with the Generic Content Module, the alert box works when in the module area, but when I display a Generic Content List in a page that pulls the same content Content Item that worked in the module area, the alert box does not work.  In fact, any reference to any script appears to be deleted from the page, including any inline mouseover type logic.

    Please provide some guidance because it's driving me nuts!!!

    On another subject, is there any way to wordwrap the nodes in the CategoryTree control?


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    21 Jul 2010
    Link to this post
    Hi Frank Nieto,

    The scripts should not be deleted when you preview a page. You could take a look at the attached video
    If you are making reference to a js file you could try to add it to your master page.

    CategoryTree is RadTreeView control. Telerik RadTreeView does not support text-wrapping by default. You can break the line using one of the following ways

    • Add line breaks to the text of the TreeNodes -
    <telerik:RadTreeNode runat="server" Text="Root<br>Node"/>

    • Add style directly to the TreeView or TreeNode definition

    style="white-space: normal;">

    •   for a specific node style="white-space: normal;
    • You can use Templates   with the control, but you should override it. You have to inherit from Telerik.Cms.Engine.WebControls.Categories.CategoriesTree and override BindCategories() method.

    The declaration of the RadTreeView control of CategoryTree is inside embedded CategoriesTree.ascx template that you can map How to map a template

    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
  3. Frank Nieto
    Frank Nieto avatar
    5 posts
    30 May 2010
    21 Jul 2010
    Link to this post

    You have helped me tremendously with this and a couple of other questions...  As always it is very much appreciated.

    As a matter of documentation, part of the issue with the scrips disappearing was because I was looking at an item in the wrong category (oops).  The other issue was that the content filter EncodeScripts appeared to have been causing an issue as well.  I removed it and everything was working like a charm!

    Thanks so much!
Register for webinar
3 posts, 0 answered