You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2008/06/17 17:47:46 UTC

[jira] Issue Comment Edited: (SLING-466) JST scripting engine: render indexable HTML and separate javascript code

    [ https://issues.apache.org/jira/browse/SLING-466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605326#action_12605326 ] 

bdelacretaz edited comment on SLING-466 at 6/17/08 8:47 AM:
--------------------------------------------------------------------

Revision 668200 renders the HTML and javascript separately, using the JsCodeGeneratorServlet, mapped to the jst selector and js extension, to generate the javascript code.

The page title is the value of the first of these properties that's set on the node being rendered, if they are present: title, name, description. If not, the title is the node path, relative from the root.

      was (Author: bdelacretaz):
    Revision 668200 renders the HTML and javascript separately, using the JsCodeGeneratorServlet, mapped to the jst selector and js extension, to generate the javascript code.

The page title is the value of the first of these properties that's set on the node being rendered, if they are present: title, name, description. If not, the title is the node path, relative from the root.

I'm thinking of allowing additional <head> elements to be defined by the JST script, maybe something like

<!-- jst:head
<link rel="stylesheet" href="/apps/foo/foo.css"/>
<link rel="stylesheet" href="/apps/foo/foo.print.css"/>
-->

Where everything between the comments would be added to the generated html <head> element.

And maybe also use something like

<!-- jst:body:class foo -->
<!-- jst:body:id bar -->

To set class=foo and id=bar on the generated <body> element.

  
> JST scripting engine: render indexable HTML and separate javascript code
> ------------------------------------------------------------------------
>
>                 Key: SLING-466
>                 URL: https://issues.apache.org/jira/browse/SLING-466
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> The JST scripting engine should output a default HTML rendering, meant to be indexed by search engines, with a <script> element that points to a separate javascript resource to render the page.
> The idea is that the javascript code will be cached by client browsers, being the same for all resources that have the same sling:resourceType.
> The HTML rendering should include a meaningful <title> element, using the value of a property named "title" or "description", if present, or the node name if not.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.