Basic Modifications

Changes to a Portal Theme can be made from within the admin application itself via the embedded browser-based code editor. Alternatively, the entire theme could be downloaded to a local computer, edited, and re-uploaded. As soon as the Portal Theme changes in the admin application, those modifications will be reflected in any Portal that uses it.

Modifying the Style

In the admin application, open /static/syle/vars.less. Change the value of @harp-background to black. Then refresh any page in your portal. The refresh will take a moment as the server re-compiles the .less into a new .css file. Once the page reloads, you should see the new color scheme.

Modifying DITA Elements' Style

When rendering DITA content as HTML, Titania Delivery sets the base DITA element type as the class attribute of the output HTML tag. For example, a shortdesc element is transformed into HTML as <div class="shortdesc">...</div>.

To edit these styles, open /static/syle/dita.less in the admin application. On line 5 change this:

color: @harp-primary ! important;

to this:

color: red ! important;

Now view any content in the portal. The title of that content should now be in red-colored font.

Modifying the Templates

In the admin application, open /pages/portal-home.ftl. Find the following markup starting on line 46.

<div class="container">
 <div class="jumbotron">
  <h1>${portal.displayName?html}</h1>
  <p>${portal.description?html}</p>
  .
  .
  .

Add <h1>Hello, Portal!</h1>. Reload the Portal home page and you should see your message.

To do something more interesting, add the line <h1>Hello, ${currentUrl}</h1> instead. The ${} syntax tells Freemarker to replace that text with the data corresponding to the inner variable.

Note: If you do not see your changes after the page refreshes, make sure that the Portal you are viewing uses the Portal Theme you are currently editing.

Modifying the transforms

See Writing XSLT for DITA.