The sample is depricated. Please use the new Angular Frontend Renderer here
NOTE: Latest supported version: Sitefinity CMS 13.1.7400.0
The sample code in this repo implements a decoupled frontend SPA renderer for Sitefinity CMS. It uses the Sitefinity Layout API services to render the layout and widget content in Sitefinity MVC pages. This implementation also works with personalized pages and personalized widgets to enable per-user content personalization. The sample code uses the Angular framework.
In this repository, you can find these sample apps:
-
The
master
branch contains a blank starter kit.Use it when you want to have full control over the functionality of your app.
-
The
quantum-landing-page
branch contains a sample app which demonstrates how to consume and present content and layout. Use it to learn how to build an Angular based frontend app. To run this app, you need to set up an instance of the Sitefinity Quantum sample project.
- Node.js 12.0 LTS or later.
- npm 6.0 or later.
To develop using the provided source sample, perform the following:
-
Clone this repository.
-
To use the sample app, use your Git client to switch to the
quantum-landing-page
branch. -
Using a text editor, open this file:
<local repository>/src/app/services/root-url.service
-
Locate the
getUrl
method. -
Change the value it returns to be the URL of your Sitefinity CMS instance containing the data you want to expose.
-
Open a new Command Prompt inside the directory with your local repository.
-
To install project dependencies, run
npm install
. -
To start the sample application, run
npm start
.The application starts listening on localhost:4200.
-
To verify that the sample application works, perform the following:
-
Log into your Sitefinity CMS instance with administrative credentials.
-
Click Pages.
-
In the Actions menu of the page that you want to render, click Title & properties.
-
Copy the last segment of the page’s URL.
For example,
welcome
. -
In your browser, enter
localhost:4200/<URL of the page to render>
For example, enter
localhost:4200/welcome
.
-