Closed Syvius closed 13 years ago
I found a work around, write b.html as:
and use c to extends b, c.html:
:). But I also like japid to support extends abstract class by abstract class.
hum, the formatting of your code is not picked up, please try adding 4 spaces in front of every line of CODE.
tks
Hi,
Multi-layer extension of the layout is not supported as you have noticed. Extending views are supported as you also have noticed. Japid makes no difference between views and tags, meaning any views can be used as tags, but layouts are compiled differently.
I'll consider your suggestion and see if I can come up with something clean.
Thanks for using Japid.
I'll
Sorry, I mean in the comments.. above! ;-/
In fact, write multi-layer extension in Japid is possible. I don't like put all layouts to _layout and put all tags to _tags. I want to organize them like this:
ControllerName
-tags
tag1.html
tag2.html
-layout
layout1.html
layout2.html
index.html (extends layout1)
somefunction.html (extends layout2)
It's easy to maintain. Japid is amazing. Now i can do it just don't use #{doLayout /}. Thanks Bing.
I just committed the change to implements the `abstract directive.
BTW, a few of my developers organize the tags the same way as you did. The new feature I have committed (partial path spec) allows one to reference tags and layouts in current view's sub-directory easier.
Hi, Bing.
I have a template named a.html: {#get 'css' /} As i know, it will be compiled as a abstract class with a abstract method css(). I want make a template b.html to extends a.html, like this: {#get 'css' /} {#get 'js' /} When i try to get it work, an error occurs: "The abstract method css in type a can only be defined by an abstract class." Then I look at the b.java. The class b is not abstract. Could you support a way to define class as abstract? Simple way like add a line to top `abstract. Thanks.