Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define enclosing page directly in page content and chain enclosing pages #1

Open
Nowaker opened this issue May 18, 2011 · 3 comments
Open

Comments

@Nowaker
Copy link
Collaborator

Nowaker commented May 18, 2011

Currently, enclosing pages are defined during compilation:
lspc -enclose enclose.lsp subpage.lsp

Currently, I am adapting LSPX to compile pages during runtime. (Can you image recompiling and redeploying application every little change to template?) Everything works like a charm now including lsp:import and lsp:include/part.

However, I would really enjoy it if I could define enclosing page directly in subpage content.

<lsp:root extend="ENCLOSE.LSP" xmlns:lsp="http://staldal.nu/LSP/core" xmlns="http://www.w3.org/1999/xhtml" >
    <lsp:part name="head">
    <meta name="foo" content="bar"/>
</lsp:part>
...

Next step would be chaining enclosing pages.

base.lsp

<html>
  <body>
    <lsp:include part="menu" />
    <lsp:include part="content" />
  </body>
</html>

menu.lsp

<lsp:root extend="base.lsp">
  <lsp:part name="menu">
    <lsp:include part="top" />
    <lsp:include part="bottom" />
  </lsp:part>
</lsp:root>

actual-page.lsp

<lsp:root extend="menu.lsp">
  <lsp:part name="top">
    ...
  </lsp:part>

  <lsp:part name="bottom">
    ...
  </lsp:part>
  <lsp:part name="content">
    ......
  </lsp:part>
</lsp:root>

I would be really happy if you implemented that.
Thanks for LSPX.

BTW - You may take a look at Open Power Template 2 - a PHP template engine that looks like LSPX... but is way better and used quite often.

@mikaelstaldal
Copy link
Owner

These are good ideas.

@Nowaker
Copy link
Collaborator Author

Nowaker commented May 22, 2011

Would you then implement <lsp:root extend="name.lsp" /> feature including "multiple inheritance"?

@Nowaker
Copy link
Collaborator Author

Nowaker commented Jun 21, 2011

Defining enclosing page directly in page content done:
<lsp:root extend="name.lsp"> or <html lsp:extend="../can/be/relative/name.lsp>.

Committed to Spring Web MVC's hot compiler.

I won't be able to do enclosing pages chaining, looks magic for me for now. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants