Created
June 9, 2015 10:34
-
-
Save Bellfalasch/3b4cf04e91084e09cdf3 to your computer and use it in GitHub Desktop.
page-template.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet exclude-result-prefixes="#all" version="2.0" xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:portal="http://www.enonic.com/cms/xslt/portal" | |
xmlns:stk="http://www.enonic.com/cms/xslt/stk"> | |
<!-- HTML 5 doctype --> | |
<xsl:output doctype-system="about:legacy-compat" method="xhtml" encoding="utf-8" indent="no" omit-xml-declaration="yes" include-content-type="no"/> | |
<!-- Select template based on current device --> | |
<xsl:template match="/"> | |
<xsl:call-template name="page"/> | |
</xsl:template> | |
<!-- Desktop template --> | |
<xsl:template name="page"> | |
<html lang="en"> | |
<head> | |
<title>Mesan</title> | |
<!-- How to link to a file on the server --> | |
<link rel="shortcut icon" type="image/x-icon" href="{portal:createResourceUrl('/_public/images/favicon.ico')}"/> | |
<!-- Check setting on the Site for public resources --> | |
<!-- Use webdav to upload files --> | |
<!-- Whatever JS you need --> | |
<script src="{portal:createResourceUrl('/_public/js/head.load.min.js')}"/> | |
<noscript> | |
<style> | |
.js-img {display:none;} | |
/* Inline CSS? No problem */ | |
</style> | |
</noscript> | |
</head> | |
<body> | |
<div id="container"> | |
<h1>My first headline</h1><!-- Hard coded html --> | |
<!-- Output HTML from the "Document" html area field on the Page Template --> | |
<xsl:copy-of select="/result/context/resource[1]/document/*" /> | |
</div> | |
</body> | |
</html> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment