Monday, January 20, 2014

Orchard Commands to generate code

To open Orchard command line tool
Go to Orchard.Web > bin > Run Orchard.exe

1. Theme scaffolding

     - codegen theme SampleSite /CreateProject:true
      - codegen theme MyFirstTheme

SampleISite : New Theme project
use second command if you want to generate theme in existing Theme project of orchard source code

Orchard - Command line scaffolding


Code generation is an Orchard module that automates the task of creating additional files and extensions. This feature is useful for developers that want to create controllers, data migration classes, modules, and themes. However, the code generation feature is not installed by default when you install Orchard.

Enable it via command line


feature enable Orchard.CodeGeneration


http://docs.orchardproject.net/Documentation/Command-line-scaffolding


Pop up to ask user before leaving a page if there are unsaved chnages.

Here is the good article to implement this functionality but i was unable to do this with post back buttons in share point web part, it broke all subsequent post backs on page if user clicks "Stay on page", for Hypelinks it works perfectly. I used javascript confirm for postback buttons.

http://snippets.surfthru.com/post/Check-For-Unsaved-Changes-Before-Leaving-a-Page.aspx

Friday, November 22, 2013

Browser Back button functionality


href="#" onClick="history.go(-1); return false;" class="btnCss"  Back