How do I take a traditional html/css/js web page and convert to run a as a skin or container
Last Post 05/12/2013 7:55 AM by Paul. 8 Replies.
Author Messages
Paul
Nuker
Nuker
Posts:12


--
05/04/2013 9:04 PM
    I have a webpage I wish to implement in DNN how would I do this?
    here is the code example the url is not valid:



    http://www.w3.org/TR/xhtml1/DTD/xht...tional.dtd">



    AccordionImages





    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> <br /> <script type="text/javascript" src="js/jquery.gridAccordion.min.js"></script> <br /> <br /> <script type="text/javascript"> <br /> <br /> jQuery(document).ready(function($){ <br /> $('.accordion').gridAccordion({width:900, <br /> height:600, <br /> columns:5, <br /> distance:8, <br /> openedPanelWidth:'max', <br /> openedPanelHeight:'max', <br /> alignType:'centerCenter', <br /> slideshow:true, <br /> panelProperties:{ <br /> 0:{captionWidth:200, captionHeight:35, captionTop:30, captionLeft:30}, <br /> 4:{captionWidth:150, captionHeight:100, captionTop:30, captionLeft:650}, <br /> 7:{captionWidth:310, captionHeight:35, captionTop:350, captionLeft:40}, <br /> 8:{captionWidth:300, captionHeight:40, captionTop:150, captionLeft:35}, <br /> 11:{captionWidth:150, captionHeight:120, captionTop:300, captionLeft:30}, <br /> 14:{captionWidth:300, captionHeight:40, captionTop:30, captionLeft:50}, <br /> 16:{captionWidth:150, captionHeight:120, captionTop:150, captionLeft:10}, <br /> 18:{captionWidth:300, captionHeight:40, captionTop:130, captionLeft:50} <br /> }}); <br /> }); <br /> <br /> </script> <br /> <br /> </head> <br /> <br /> <body> <br /> <ul class="accordion"> <br /> <li> <br /> <img src="http://prom.com/image1.jpg"/> <br /> <div class="caption">This is just a simple caption.</div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image2.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image3.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image4.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image5.jpg"/> <br /> <div class="caption"><u>Title</u><br/><br/>This is a list of items:<ul><li>first item</li><li>second item</li><li>third item</li></ul></div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image6.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image7.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image8.jpg"/> <br /> <div class="caption">Captions can have any position and any size.</div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image9.jpg"/> <br /> <div class="caption">Add <b>HTML</b> elements like <a href="http://prom.com">links</a> or <input type="button" value="Buttons"/></div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image10.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image1.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image2.jpg"/> <br /> <div class="caption"><u>Title</u><br/><br/>This is a list of items:<ul><li>first item</li><li>second item</li><li>third item</li></ul></div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image3.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image4.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image5.jpg"/> <br /> <div class="caption">Add <b>HTML</b> elements like <a href="http://prom.com">links</a> or <input type="button" value="Buttons"/></div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image6.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image7.jpg"/> <br /> <div class="caption"><u>Title</u><br/><br/>This is a list of items:<ul><li>first item</li><li>second item</li><li>third item</li></ul></div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image8.jpg"/> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image9.jpg"/> <br /> <div class="caption">Add <b>HTML</b> elements like <a href="http://prom.com">links</a> or <input type="button" value="Buttons"/></div> <br /> </li> <br /> <li> <br /> <img src="http://prom.com/image10.jpg"/> <br /> </li> <br /> </ul> <br /> </body> <br /> </html>
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    05/05/2013 6:29 PM
    Well, the correct way would be to create a skin that matches the look and feel of the page. Then drop an HTML module into the page and put your content. You can turn off display of the container, so you can skip that part.

    In the code that you pasted, put everything between the body tags in an HTML module. Put the scripts in the Module Header (Module Settings, Advanced Settings)

    You don't really need the jquery stuff. jquery is included with DotNetNuke. If you look at our tutorial with the Accordian name in the title, you can see how to do that too.

    Feel free to ask more questions.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Paul
    Nuker
    Nuker
    Posts:12


    --
    05/05/2013 7:06 PM
    Thanks for the input Joseph. I followed your suggestions but the accordion just lists images and their is no grid. I still need to implement the js specific to this horizontal/vertical grid accordion (jquery.gridAccordion.min.js) as it contains functions written for this.
    where would I place the js script and would I put it under the skin or under the container.

    Joseph Craig
    DNN MVP
    Posts:11667


    --
    05/06/2013 7:43 AM
    I would put the special javascript and jquery files in the installation's js directory. You'll need to make sure that you reference them correctly.

    You may need to take some care to make sure that there are no conflicts between your code and that which is part of DotNetNuke.

    If your site is available on the Internet and you can post a lint, I can take a look.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    05/06/2013 9:33 AM
    I just reread. No need to worry about code conflicts, I think. Just put the js files in the js directory and change your scripts to point to them.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Paul
    Nuker
    Nuker
    Posts:12


    --
    05/08/2013 3:17 AM
    I added the js scripts to the header and you now see the result.
    http://al-azure.com.dnnmax.com/TEST...fault.aspx

    I also added my css to the css folder under the skin.
    The problem is now the functionality is there but there is no grid. It has created the grid as a list. any ideas how I correct this?
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    05/08/2013 10:07 AM
    My first guess would be that the CSS isn't referenced correctly. Check using your browser's developer tools.

    If you look at the more recent tutorials, Andy does a superb job demonstrating how to use the developer tools in Chrome.

    Joe Craig, Patapsco Research Group
    Complete DNN Support
    Paul
    Nuker
    Nuker
    Posts:12


    --
    05/09/2013 4:11 AM
    Thanks so much Joseph that did the trick, as you can see if you visit the page. However I have an initialization issue. When I visit the page it works fine, but if go to another page and return it no longer works. Any ideas on this?

    Regards
    Paul Buckley
    Paul
    Nuker
    Nuker
    Posts:12


    --
    05/12/2013 7:55 AM
    I resolved this with the css placement. Thanks again for your help on pointing me to a solution.


    ---