Theme: Adding a New Rail Icon - akumina/AkuminaTraining GitHub Wiki
Akumina Foundation 3.3.0.0 and later
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.
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>
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/
In AppManager, Go to the Management Apps Tab and click Rail Manager
Click Add New button and fill in the details for the Rail Item
Navigate back to your Digital Workplace Site. Refresh the Cache and refresh your browser. You new Rail Icon will appear.
See the following articles for more details on Theming: