More in this section

Forums / Developing with Sitefinity / Build Intra-site module

Build Intra-site module

13 posts, 0 answered
  1. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    14 Nov 2007
    Link to this post
    Sitefinity Team,

    I keep getting following error message when I built my Intra-Site module:

    Error    1    The type 'Nolics.ORMapper.WebBinding.WebTransaction' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\Nolics.Engine.v4.2\4.2.2520.4__c50af72fde0670b7\Nolics.Engine.v4.2.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\dev\2f19eaec\2092b53f\assembly\dl3\cd02febb\00c5ddc8_e11ac801\Nolics.Engine.v4.2.DLL'  


    Please help
    Thanks in advance
    Tim
  2. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    15 Nov 2007
    Link to this post
    Hello Tim,

    We answered your question in your other forum thread:
    http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-baggdh.aspx.

    Greetings,
    Slavo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    15 Nov 2007
    Link to this post

    Sitefinity Team,

    I built my Intra-site module using RadGrid control and I would like to apply the skin and theme like Sitefinity News -- all news item grid look.

    Please show me how to do it
    Thanks in advance
    Tim

  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    16 Nov 2007
    Link to this post
    Hello Tim,

    The styles for Sitefinity grids are in the global1.css file located in ~/Sitefinity/Admin/Themes/Default/ folder. The starting point for grid styles in the .css file is marked as "/*Grid*/". You could also take a look at some templates, containing GridView control to learn how to set necessary css classes, for example ~/Sitefinity/Admin/ControlTemplates/Blogs/ControlPanelAllBlogs.ascx template.

    Hope this helps.

    Sincerely yours,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    16 Nov 2007
    Link to this post

    Sitefinity Team,

    Thanks, I will take a look at CSS file you mentioned.

    At same time, I experienced some wired problem. I built my intra-site using datagrid and detailsview controls. After I plugged my *.ascx file (like controlpanel.ascx and ToolboxPanel.ascx) into Sitefinity CMS system.  The RadGrid1_ItemCommand event doesn't fired at all for view, edit and delete command. It happened to me twice already and I have to end up with recreate a brand new *.ascx file in order to make the control works.  I used to use datagrid and detailsview controls a lot and it never gave the same problem before.

     But I do understand the problem might have nothing to do with Sitefinity CMS. It could be something I did. Please let me know if I missed anything.


    Thanks in advance
    Tim

  6. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    16 Nov 2007
    Link to this post

    Sitefinity Team,

    I did check out the CSS file you mentioned and they are all for the front end. I need the CSS style sheet for the backend CMS so that I can make my intra-site module looks consistent with Sitefinity CMS.

    Please help me out
    Thanks
    Tim

  7. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    16 Nov 2007
    Link to this post
    Hello Tim,

    Are you sure you checked the correct folder? I'm positive that we store all back-end styling in ~/Sitefinity/Admin/Themes/Default. All modules get their CSS from there (the file is called modules.css). If you want to style a grid like in News or Blogs, check this file.
    To be more precise - control templates for public (front-end) controls are located in ~/Sitefinity/ControlTemplates, and for the back-end they are in ~/Sitefinity/Admin/ControlTemplates.
    These folders, however, only contain markup. All CSS is in the themes, and the back-end theme is only one, residing in the first path above.

    Kind regards,
    Slavo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    18 Nov 2007
    Link to this post
    Sitefinity Team,

    Could you please show me which CSS is for detailsview in backend CMS system?

    Thanks
    Tim
  9. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    19 Nov 2007
    Link to this post
    Hi Tim,

    The Details section is set up in the following code marked with /*Details*/ in /<your_project>/Sitefinity/Admin/Themes/Default/Modules.css:
    /*Details*/ 
    .details { 
        float: right; 
        width: 30%; 
        font-size: 11px; 
        margin-top: 5px 
    .details h3 { 
        font-size: 12px; 
        color: #000; 
        font-weight: bold; 
        margin: 0; 
        border-bottom: 2px solid #000; 
        margin-bottom: 0; 
        position: relative; 
    .details dl { 
        margin: -1px 0 0; 
        border-bottom: 1px solid #ccc; 
        padding: 0 0 1px; 
        width: 100%; 
        overflow: hidden; 
    .details dt { 
        padding: 5px 0 4px 0; 
        width: 40%; 
        border-top: 1px solid #ccc; 
        float: left; 
        clear: left; 
    .details dd { 
        margin: 0; 
        padding: 5px 0 4px 0; 
        border-top: 1px solid #ccc; 
        width: 60%; 
        float: left; 
        overflow: hidden; 
    /* IE 6 */ 
    * html div.details dd { 
        margin: 0 0 0 40%; 
        width: auto; 
        float: none; 
    /* IE 7 */ 
    html>body div.details dd { 
        *margin: 0 0 0 40%; 
        *width: auto; 
        *float: none; 

    If this is not what you need, please send us a screenshot, marking what functionality you want to achieve.

    Greetings,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    27 Nov 2007
    Link to this post
    Sitefinity Team,

    I still have problem to apply Sitefinity CMS detailsview style sheet. I am just wondering if you could show me some samples. I might help me a lot.

    Thanks a lot
    Tim

  11. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    27 Nov 2007
    Link to this post
    Hi Tim,

    Unfortunately, I am not sure what you mean by details view.  Will you please send me a screen shot of the design you want to achieve or one similar to that? Also, I will be of maximum help to you if I have a link to your website in order to see the html you want to apply styles to or you can send the html itself.

    Regards,
    Katia
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    27 Nov 2007
    Link to this post
    Sitefinity Team,

    I want <asp:detailsview> edit mode looks like Sitefnity CMS news edit mode. That way my Intra-site module looks consistent with Sitefinity CMS on the backend.

    <asp:DetailsView ID="detailsViewSubCategory" runat="server" Width="100%" AutoGenerateRows="False" 
                        DataKeyNames="ID" DataSourceID="SubCateogryQuery" OnItemCommand="detailsViewSubCategory_ItemCommand" 
                        OnItemInserted="detailsViewSubCategory_ItemInserted" OnItemUpdated="detailsViewSubCategory_ItemUpdated" 
                        OnItemInserting="detailsViewSubCategory_ItemInserting" OnItemUpdating="detailsViewSubCategory_ItemUpdating" CssClass="~/Sitefinity/Admin/Themes/Default/Skins/DetailsView/Sitefinity/Styles.css"
                        <Fields> 
                            <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" 
                                Visible="False" /> 
                            <asp:BoundField DataField="name" HeaderText="Sub Category" SortExpression="name" /> 
                            <asp:BoundField DataField="Category_ID" HeaderText="Category_ID" SortExpression="Category_ID" 
                                Visible="False" /> 
                            <asp:BoundField DataField="DateModified" HeaderText="DateModified" SortExpression="DateModified" 
                                Visible="False" /> 
                            <asp:TemplateField HeaderText="Category:"
                                <ItemTemplate> 
                                    <asp:Label ID="labCategory" Text='<%# Eval("Category_lnk.name") %>' runat="server"></asp:Label> 
                                </ItemTemplate> 
                                <InsertItemTemplate> 
                                    <asp:DropDownList DataSourceID="CategoryQuery" DataTextField="name" DataValueField="ID" 
                                        ID="ddlCategory" runat="server"
                                    </asp:DropDownList> 
                                </InsertItemTemplate> 
                                <EditItemTemplate> 
                                    <asp:DropDownList DataSourceID="CategoryQuery" DataTextField="name" DataValueField="ID" 
                                        ID="ddlCategory" runat="server"
                                    </asp:DropDownList> 
                                </EditItemTemplate> 
                                <ControlStyle Font-Size="12px" /> 
                                <HeaderStyle Font-Size="12px" HorizontalAlign="Left" /> 
                            </asp:TemplateField> 
                            <asp:TemplateField> 
                                <ItemTemplate> 
                                    <asp:LinkButton ID="lbtnCancel" runat="server" CommandName="Cancel" Text="Return"></asp:LinkButton> 
                                </ItemTemplate> 
                                <InsertItemTemplate> 
                                    <asp:LinkButton ID="lbtnInsertItemInsert" runat="server" CommandName="Insert" Text="save"></asp:LinkButton> 
                                    &nbsp; 
                                    <asp:LinkButton ID="lbtnInsertItemCancel" runat="server" CommandName="Cancel" Text="Cancel"></asp:LinkButton> 
                                </InsertItemTemplate> 
                                <EditItemTemplate> 
                                    <asp:LinkButton ID="lbtnEditItemUpdate" runat="server" CommandName="Update" Text="Save"></asp:LinkButton> 
                                    &nbsp; 
                                    <asp:LinkButton ID="lbtnEditItemCancel" runat="server" CommandName="Cancel" Text="Cancel"></asp:LinkButton> 
                                </EditItemTemplate> 
                            </asp:TemplateField> 
                        </Fields> 
                    </asp:DetailsView>                


    Thanks
    Tim
  13. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    28 Nov 2007
    Link to this post
    Hello Tim,

    CSS is html and class name dependent. To achieve some design you need to properly set your style sheets  for your html mark-up and the class names you have set to it. Thus, you cannot apply a css file to a web page and expect that all styles will be correctly applied if the html mark-up and the class names in this page are different from the ones described in the style sheet.

    The CssClass property specifies the class name of the html tag that will be rendered in the web page, not the path to the css file that should be applied to that page. Therefore, you can replace the current CssClass value with categoriesDetails (CssClass="categoriesDetails" instead of CssClass="~/Sitefinity/Admin/Themes/Default/Skins/DetailsView/Sitefinity/Styles.css").

    As far as I can guess,  the template you sent was rendered as a table. Hence, the table would be given a "categoriesDetails" class name. The html wouldl be something like:

    <table class="categoriesDetails">
    ...
    </table>

    You can apply css styles to that table in the css file that is used by the page. That should be modules.css in ~/Sitefinity/Admin/Themes/Default. The css should look like:

    table.categoriesDetails {
        margin: 0;
        padding: 0;
        background-color: #e8edee;
        width: 100%;
    }

    Furthermore, you can add css styles controlling the appearance of the table cells and the other html tags that will be rendered in these cells, such as inputs, selects, labels, ect.

    table.categoriesDetails td {
        padding: 2px 5px;
    }

    table.categoriesDetails td label {
        add css here
    }

    table.categoriesDetails td input {
        add css here
    }

    In the ascx file, you can directly set class names to the table cells and the tags in these cells using properties like:

    ControlStyle-CssClass="type_some_classname_here"
    ItemStyle-CssClass="type_some_classname_here"
    HeaderStyle-CssClass="type_some_classname_here"
    ControlStyle-CssClass="type_some_classname_here"

    or tags like:

    <ItemStyle CssClass="type_some_classname_here" />

    In conclusion, it is not possible to automatically apply the design of news edit mode. You have to write some css styles to achieve it.

    Another approach I can suggest is rewriting the template so that it renders html like the html the news edit mode template renders (~/Sitefinity/Admin/ControlTemplates/Generic_Content/ControlPanelEdit.ascx).

    Regards,
    Katia
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
13 posts, 0 answered