Beginners Question - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Beginners Question

  • Beginners Question
  • So, I am in the process of building a new Module. I was able to create the module (it was very simple) and get it on the form. I can also use thunder to modify the template. However, when i put the module on a page... all of the items are vertical, but i want them horizontal (similar to the image thumbnail list). I'm sure this is set by the CSS referenced by module. 

    So my question is... how to modify the css that it is using? I can create new css files/code, but how do i get it where the module will use it? I'm sure there is some documentation on this.. but i kept looking and decided I would just ask the experts! Thanks!
  • Hello,

    If you want to add css to your content module, you can include it with our Sitefinity ResourceLinks control on the template. Here's an example:

    <sitefinity:ResourceLinks runat="server" UseEmbeddedThemes="true" Theme="Basic">
        <sitefinity:ResourceFile JavaScriptLibrary="JQuery"/>
        <sitefinity:ResourceFile Name="MyContent.Common.common.js" AssemblyInfo="MyContent.TabStrip.TabStripLayout, MyContent" Static="True" />
        <sitefinity:ResourceFile Name="MyContent.Common.Designer.css" AssemblyInfo="MyContent.TabStrip.TabStripLayout, MyContent" Static="True" />
        <sitefinity:ResourceFile Name="MyContent.TabStrip.Resources.TabStrip.css" AssemblyInfo="MyContent.TabStrip.TabStripLayout, MyContent" Static="True" />
        <sitefinity:ResourceFile Name="MyContent.TabStrip.Resources.TabStrip.js" AssemblyInfo="MyContent.TabStrip.TabStripLayout, MyContent" Static="True" />
    </sitefinity:ResourceLinks>
    It is important to know that all static files, which are embedded in the assembly of your module, should be marked as EmbeddedResource in their Properties and registered in the AssemblyInfo.cs file of the module, as following:
    [assembly: WebResource("MyContent.TabStrip.Resources.configurator.png", "image/png")]
    [assembly: WebResource("MyContent.TabStrip.Resources.tabcontainer.png", "image/png")]
    [assembly: WebResource("MyContent.TabStrip.Resources.tablayouts.png", "image/png")]
    [assembly: WebResource("MyContent.TabStrip.Resources.TabStrip-min.css", "text/css", PerformSubstitution = true)]
    [assembly: WebResource("MyContent.TabStrip.Resources.TabStrip.css", "text/css", PerformSubstitution = true)]
    [assembly: WebResource("MyContent.TabStrip.Resources.TabStrip.js", "text/javascript")]
    [assembly: WebResource("MyContent.TabStrip.Resources.tabstripcontainer.png", "image/png")]
    [assembly: WebResource("MyContent.TabStrip.Resources.TabStripDesigner.js", "text/javascript")]

    Kind regards,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items