Pages

Saturday 22 October 2016

Appending .html to the URL in Sightly

<a href="${properties.path ? '{0}.{1}' : 'Default Path'  @ format=[properties.path,'html']}" class="link">${properties.title || 'Default Title'}</a>

Or

<a href="${currentPage.path @ extension = 'html'}">${currentPage.title}</a>

1 comment:

Converting InputStream to String

    private String convertToString(InputStream inputStreamObj)             throws IOException {         if (inputStreamObj != null) {     ...