Coder Social home page Coder Social logo

lombiq / orchard-scripting-extensions-javascript Goto Github PK

View Code? Open in Web Editor NEW
1.0 14.0 0.0 24 KB

A child module for Orchard Scripting Extensions for running JavaScript code inside Orchard.

License: Other

C# 91.52% HTML 8.48%
orchard orchard-cms orchard-module scripting

orchard-scripting-extensions-javascript's Introduction

Orchard Scripting Extensions: JavaScript

About

A child module for Orchard Scripting Extensions for running JavaScript code inside Orchard.

Documentation

This module depends on JavaScript.Net Orchard and Orchard Scripting Extensions. It uses many of the latter's features. Please install it first! (And also read that module's docs to see what you can do with it - and through it, with JavaScript). JavaScript execution goes through the excellent Javascript .NET library. Samples

var hello = "Hello JavaScript!"; 
hello; // The last statement will be the output of the script

// You can instantiate types that were loaded to the script context through the Factory object
var obj = Factory.Create("System.Object", null);
obj.ToString(); // Outputs "System.Object"

// There is an Orchard global variable that you can add fields to. By default it contains a WorkContext field with the Orchard WorkContext and an OrchardServices field with an IOrchardServices instance
Orchard.WorkContext.CurrentSite.SiteName;

// This adds the string "Hello!' to the markup of the layout's Body zone (this will just show up in the html source!).
Orchard.Layout.Get("Body").Add("Hello!"); 

Contributing and support

Bug reports, feature requests, comments, questions, code contributions, and love letters are warmly welcome, please do so via GitHub issues and pull requests. Please adhere to our open-source guidelines while doing so.

This project is developed by Lombiq Technologies. Commercial-grade support is available through Lombiq.

orchard-scripting-extensions-javascript's People

Contributors

benedekfarkas avatar i3undy avatar piedone avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.