Theme: Adding a New Rail Icon - akumina/AkuminaTraining GitHub Wiki

Applies to

Akumina Foundation 3.3.0.0 and later

Walkthrough

Below we'll step through adding a new Rail Icon. Before adding a new Icon via the Rail Manager we will need to create a custom View and Callback for it.

View

Create a new View called RailHelloWorldTemplate.html. Using the View Manager, upload it to DigitalWorkPlace/Content/Templates/Rail/

<h1>Hello World!!!</h1>
<p>
{{MyContent}}
</p>

Callback

Download digitalworkplace.custom.js from /Style Library/DigitalWorkplace/JS/ in SharePoint. Paste the function below within the file.

function helloWorldCallback(item) {
	var def = $.Deferred();
	var title = $(item).find('span.ak-nav-title').text();
	var railItemModel = {
		"Header": title, 
		"MyContent": "Hello World Rail Item Content", 
		"Footer":{ Text:"Hello World Footer", Link:"#"}
	};
	def.resolve(railItemModel);
	return def;
}

Upload the newly modified digitalworkplace.custom.js file to /Style Library/DigitalWorkplace/JS/

Rail Manager

In AppManager, Go to the Management Apps Tab and click Rail Manager

rail 9

Click Add New button and fill in the details for the Rail Item

rail 10

rail 11

Result

Navigate back to your Digital Workplace Site. Refresh the Cache and refresh your browser. You new Rail Icon will appear.

rail 12

References

See the following articles for more details on Theming:

⚠️ **GitHub.com Fallback** ⚠️