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

Forums / Developing with Sitefinity / Formatting modules in admin.

Formatting modules in admin.

8 posts, 0 answered
  1. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    12 May 2009
    Link to this post
    Hi,
    In 3.6 how should I go about creating a template for the news entry text box in admin?
    I want it to be obvious to my administrators when adding a new news item where they should add text, images, video etc, so the output is not all contained in several long <p> tags.

    Thanks
    Simon
  2. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    12 May 2009
    Link to this post
    Hello Simon,

    Do you mean the RadEditor output? Would you provide a screenshot and tell us about what do you mean by "not all contained in several ling <p> tags"?

    Regards,
    Dido
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    12 May 2009
    Link to this post
    Sorry, I didn't explain myself very well. It may be that I don't understand correctly how it's supposed to work.
    I do mean the RadEditor. If I enter, for example, a mix of text and images as a news item the output may be like this:

    <div class="sf_singleNews">  
        <id="ctl00_MainContent_NewsView1_ctl00_backToList1" class="sf_back" href="/videos/videodetailview.aspx">All news</a> 
        <h2 class="sf_NewsTitle">  
            Video Item  
        </h2> 
        <class="sf_newsDate">  
            29/04/2009 10:58:26  
        </p> 
        <p> 
             Some Text
        </p> 
        <p> 
            <img width="200" height="121" alt="This is a test." src="/Libraries/News_images/blu.sflb.ashx" />This is a new video item.   
     
        </p> 

    There is nothing to stop people randomly entering images first or text first and therefore the output will look different to the above.
    Is there a way to perhaps use the same html template that I'm using for the news front end, but use it within the RadEditor so it's obvious where people should enter the text and images? I don't want them to have to enter html withing the RadEditor.
    Thanks
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 May 2009
    Link to this post
    Hi Simon,

    You can try setting predefined content inline the RadEditor thus the users that are working with the editor will manage only certain ares you have defined.

    Sample:

     <telerik:RadEditor ID="RadEditor1" runat="server"
       <Content>inline HTML markup content</Content> 
    </telerik:RadEditor>  

    in the code behind

     private void Page_Load(object sender, EventArgs e) 
       if (!Page.IsPostBack) 
       { 
           RadEditor1.Content = "<b>Sample HTML inline Content</b>"
       } 
    }  


    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    13 May 2009
    Link to this post
    Hi,
    Thanks for that but I've discovered that what I'm really looking for is the RadEditor template manager function. However on the RadEditor there is no menu button for uploading templates. I believe I should be able to add this function to the editor within Sitefinity. How would I do that? Is there an .xml file somewhere that needs editing?

    Thanks.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 May 2009
    Link to this post
    Hello Simon,

    You will find EditorToolsFile.xml under Sitefinity/Admin/ControlTemplates where you can add the following declaration:

    <tool name="TemplateManager" /> 

    or use the properties directly in RadEditor declaration:

     <telerik:radeditor runat="server" ID="RadEditor1"  >     
       <TemplateManager ViewPaths="~/Templates" UploadPaths="~/Templates/" DeletePaths="~/Templates/New/" /> 
    </telerik:radeditor>  

    In the code behind

       RadEditor1.TemplateManager.ViewPaths = ...  
       RadEditor1.TemplateManager.UploadPaths = ....  
       RadEditor1.TemplateManager.DeletePath = .... 


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    14 May 2009
    Link to this post
    Excellent, thanks.
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 May 2009
    Link to this post
    Hello Simon,

    You can take a look at RadEditor's dev manual from where you can gather more information about other tools and some code examples.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
8 posts, 0 answered