Friday, November 11, 2011

How to use jQuery in Orchard CMS modules?


On the top of cshtml file put following code:
@{
    Script.Require("jQuery");
}
@using(Script.Foot()) {
    <script type ="text/javascript">
    //<![CDATA[
        $(document).ready(function () {
            alert('page loaded');
        });
    //]]>
    </script>
}

How to get selected value of dropdown by Javascript


var selectedvalue = document.getElementById('yourSelectBoxId').value

How to write a Widget for Orchard CMS? Coding, Packaging and installing


1. Coding:
http://orchardproject.net/docs/Writing-a-content-part.ashx
http://orchardproject.net/docs/Writing-a-widget.ashx
2. Packaging:
http://www.orchardproject.net/docs/Packaging-and-sharing-a-module.ashx
3. Installing:
http://www.orchardproject.net/docs/Installing-and-upgrading-modules.ashx