Is templates directory required any more?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Is templates directory required any more?

Sachin Mittal
Hi,
I see that under xwiki webapp there is a template directory, that contains vm files. Same filenames are included in respective skins directory also.

So based on my understanding of how velocity files are called and invoked upon user action, the vm files under templates directory play no role.
Also in some previous discussion it was mentioned that they were redundant and there was a plan to separate common set of vm files into single directory.

So I have two questions:
1. Can I delete the templates directory from my deployment.
2. If these files under this are no more required then what about deleting them from svn istelf.

If have I have missed something and these files are required then please let me know in what case would these be required.

Thanks
Sachin
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

vmassol
Administrator

On Feb 10, 2008, at 4:38 PM, Sachin Mittal wrote:

>
> Hi,
> I see that under xwiki webapp there is a template directory, that  
> contains
> vm files. Same filenames are included in respective skins directory  
> also.
>
> So based on my understanding of how velocity files are called and  
> invoked
> upon user action, the vm files under templates directory play no role.

The template files are used when the vm file required cannot be found  
in the skin. The role of templates is to have common vm files located  
in one place and not copied in all skins. Right now this is a bit of a  
mess but in the very near future we'll move the Albatross templates  
into the templates directory and remove all vm files in the albatross  
skin so that a skin will consist of only images, css and possibly some  
Javascript.

> Also in some previous discussion it was mentioned that they were  
> redundant
> and there was a plan to separate common set of vm files into single
> directory.

Yes that's the templates/ directory...

> So I have two questions:
> 1. Can I delete the templates directory from my deployment.

No that wouldn't be following the direction set by the xwiki dev.  
Maybe you could tell us what you're doing and why you need to remove  
that directory?

> 2. If these files under this are no more required then what about  
> deleting
> them from svn istelf.

They are required.

> If have I have missed something and these files are required then  
> please let
> me know in what case would these be required.

I'd be interested to know what you're working on.

Maybe we can work together to better support your use cases, etc.

thanks
-Vincent

_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

Sachin Mittal
Hi,
I have created a new skin and for all the user actions the vm files, css and javascript code is picked up from that skin only.
Thus others are not required. And as per the quote below the files in template directory are picked up only if vm files are not found in skin directory, this won't be the case for us because the vm file should exist in the skin directory.

Thus for the custom deployment of xwiki I was streamlining the xwiki code we are using and deleting redundant code.

Also based on your comments below, second thing I can do is, keep all the vm code under template directory only and have the css, js, images and other static resources under the skin directoy.

I feel second approach would be better one.

Thanks
Sachin


vmassol wrote

The template files are used when the vm file required cannot be found  
in the skin. The role of templates is to have common vm files located  
in one place and not copied in all skins. Right now this is a bit of a  
mess but in the very near future we'll move the Albatross templates  
into the templates directory and remove all vm files in the albatross  
skin so that a skin will consist of only images, css and possibly some  
Javascript.

I'd be interested to know what you're working on.

Maybe we can work together to better support your use cases, etc.

thanks
-Vincent
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

vmassol
Administrator
Hi Sachin,

You're free to do whatever you want of course but please don't ask for  
support later on because some xwiki skin you'll want to use doesn't  
work for you :) (it won't work but that'll be normal since it'll rely  
on files in the templates dir).

You're touching here at XWiki core structure and it's not never a good  
thing to change that unless you completely understand what it means.  
In the same way you can delete lots of jar files in the WEB-INF/lib  
dir but if you do you'll find one day that when you use such and such  
plugin it doesn't work.

Thanks
-Vincent

On Feb 10, 2008, at 6:46 PM, Sachin Mittal wrote:

>
> Hi,
> I have created a new skin and for all the user actions the vm files,  
> css and
> javascript code is picked up from that skin only.
> Thus others are not required. And as per the quote below the files in
> template directory are picked up only if vm files are not found in  
> skin
> directory, this won't be the case for us because the vm file should  
> exist in
> the skin directory.
>
> Thus for the custom deployment of xwiki I was streamlining the xwiki  
> code we
> are using and deleting redundant code.
>
> Also based on your comments below, second thing I can do is, keep  
> all the vm
> code under template directory only and have the css, js, images and  
> other
> static resources under the skin directoy.
>
> I feel second approach would be better one.
>
> Thanks
> Sachin
>
>
>
> vmassol wrote:
>>
>>
>>
>> The template files are used when the vm file required cannot be found
>> in the skin. The role of templates is to have common vm files located
>> in one place and not copied in all skins. Right now this is a bit  
>> of a
>> mess but in the very near future we'll move the Albatross templates
>> into the templates directory and remove all vm files in the albatross
>> skin so that a skin will consist of only images, css and possibly  
>> some
>> Javascript.
>>
>> I'd be interested to know what you're working on.
>>
>> Maybe we can work together to better support your use cases, etc.
>>
>> thanks
>> -Vincent
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

Sachin Mittal
Hi Vincent,
Thanks for warning me about the potential pitfall.
Well I am keeping all the jars as touching that part is dangerous.

I will tell you why I am asking this question on rendering part.

To build my new skin I am using jquery and ext-js as the javascript toolkits.
When I include them along with other javascript files they somehow don't get loaded and I am not able to get my widgets working. Currently I am build new skin for just one space, but over the time the whole UI would be rendered using javascript from these two toolkits only.
Thus other vm files which may be using some other javasscript code won't be needed and to have a cleaner code I would not like to keep these vm files.

Anyway I would always take care, keep proper backups before before tampering with the core xwiki structure.

-Sachin


vmassol wrote
Hi Sachin,

You're free to do whatever you want of course but please don't ask for  
support later on because some xwiki skin you'll want to use doesn't  
work for you :) (it won't work but that'll be normal since it'll rely  
on files in the templates dir).

You're touching here at XWiki core structure and it's not never a good  
thing to change that unless you completely understand what it means.  
In the same way you can delete lots of jar files in the WEB-INF/lib  
dir but if you do you'll find one day that when you use such and such  
plugin it doesn't work.

Thanks
-Vincent

On Feb 10, 2008, at 6:46 PM, Sachin Mittal wrote:

>
> Hi,
> I have created a new skin and for all the user actions the vm files,  
> css and
> javascript code is picked up from that skin only.
> Thus others are not required. And as per the quote below the files in
> template directory are picked up only if vm files are not found in  
> skin
> directory, this won't be the case for us because the vm file should  
> exist in
> the skin directory.
>
> Thus for the custom deployment of xwiki I was streamlining the xwiki  
> code we
> are using and deleting redundant code.
>
> Also based on your comments below, second thing I can do is, keep  
> all the vm
> code under template directory only and have the css, js, images and  
> other
> static resources under the skin directoy.
>
> I feel second approach would be better one.
>
> Thanks
> Sachin
>
>
>
> vmassol wrote:
>>
>>
>>
>> The template files are used when the vm file required cannot be found
>> in the skin. The role of templates is to have common vm files located
>> in one place and not copied in all skins. Right now this is a bit  
>> of a
>> mess but in the very near future we'll move the Albatross templates
>> into the templates directory and remove all vm files in the albatross
>> skin so that a skin will consist of only images, css and possibly  
>> some
>> Javascript.
>>
>> I'd be interested to know what you're working on.
>>
>> Maybe we can work together to better support your use cases, etc.
>>
>> thanks
>> -Vincent
_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

vmassol
Administrator
ok so I think what you're asking is how to use jquery or ext-js with  
xwiki.

That's a good question and I don't know the answer. All I know is that  
the majority of JS toolkits have some mode that allows them to run  
with other competitor too. You need to google for that.

Now back to your issue if you don't use any vm from templates then I  
don't think xwiki should load any JS files either since they're  
referenced from the vm files...

Thanks
-Vincent

On Feb 10, 2008, at 8:27 PM, Sachin Mittal wrote:

>
> Hi Vincent,
> Thanks for warning me about the potential pitfall.
> Well I am keeping all the jars as touching that part is dangerous.
>
> I will tell you why I am asking this question on rendering part.
>
> To build my new skin I am using jquery and ext-js as the javascript
> toolkits.
> When I include them along with other javascript files they somehow  
> don't get
> loaded and I am not able to get my widgets working. Currently I am  
> build new
> skin for just one space, but over the time the whole UI would be  
> rendered
> using javascript from these two toolkits only.
> Thus other vm files which may be using some other javasscript code  
> won't be
> needed and to have a cleaner code I would not like to keep these vm  
> files.
>
> Anyway I would always take care, keep proper backups before before  
> tampering
> with the core xwiki structure.
>
> -Sachin
>
>
>
> vmassol wrote:
>>
>> Hi Sachin,
>>
>> You're free to do whatever you want of course but please don't ask  
>> for
>> support later on because some xwiki skin you'll want to use doesn't
>> work for you :) (it won't work but that'll be normal since it'll rely
>> on files in the templates dir).
>>
>> You're touching here at XWiki core structure and it's not never a  
>> good
>> thing to change that unless you completely understand what it means.
>> In the same way you can delete lots of jar files in the WEB-INF/lib
>> dir but if you do you'll find one day that when you use such and such
>> plugin it doesn't work.
>>
>> Thanks
>> -Vincent
>>
>> On Feb 10, 2008, at 6:46 PM, Sachin Mittal wrote:
>>
>>>
>>> Hi,
>>> I have created a new skin and for all the user actions the vm files,
>>> css and
>>> javascript code is picked up from that skin only.
>>> Thus others are not required. And as per the quote below the files  
>>> in
>>> template directory are picked up only if vm files are not found in
>>> skin
>>> directory, this won't be the case for us because the vm file should
>>> exist in
>>> the skin directory.
>>>
>>> Thus for the custom deployment of xwiki I was streamlining the xwiki
>>> code we
>>> are using and deleting redundant code.
>>>
>>> Also based on your comments below, second thing I can do is, keep
>>> all the vm
>>> code under template directory only and have the css, js, images and
>>> other
>>> static resources under the skin directoy.
>>>
>>> I feel second approach would be better one.
>>>
>>> Thanks
>>> Sachin
>>>
>>>
>>>
>>> vmassol wrote:
>>>>
>>>>
>>>>
>>>> The template files are used when the vm file required cannot be  
>>>> found
>>>> in the skin. The role of templates is to have common vm files  
>>>> located
>>>> in one place and not copied in all skins. Right now this is a bit
>>>> of a
>>>> mess but in the very near future we'll move the Albatross templates
>>>> into the templates directory and remove all vm files in the  
>>>> albatross
>>>> skin so that a skin will consist of only images, css and possibly
>>>> some
>>>> Javascript.
>>>>
>>>> I'd be interested to know what you're working on.
>>>>
>>>> Maybe we can work together to better support your use cases, etc.
>>>>
>>>> thanks
>>>> -Vincent
>> _______________________________________________
>> devs mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>>
>
>
> -----
> http://www.assembla.com/wiki/show/sachin_mittal about me:
> --
> View this message in context: http://www.nabble.com/Is-templates-directory-required-any-more--tp15397359p15400163.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs

_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

ebullient
In reply to this post by vmassol
On Feb 10, 2008 1:03 PM, Vincent Massol <[hidden email]> wrote:
...
>
> You're touching here at XWiki core structure and it's not never a good
> thing to change that unless you completely understand what it means.
> In the same way you can delete lots of jar files in the WEB-INF/lib
> dir but if you do you'll find one day that when you use such and such
> plugin it doesn't work.
>
> Thanks
> -Vincent

This is my issue with the albatross skin in general. It assumes a
three panel layout that doesn't fit our corporate guidelines. (i.e.
per our guidelines, the content always renders first: so you end up
with the content, then the right side, then the left side).  If you
just brought all of the *.vm files from albatross into the templates
directory, I would still be broken.. I have to go and update view,
edit, inline -- any of the template documents that render the basic
layout of the page.

I have a patch (which I should submit, because I don't think I did),
that allows you to specify what the default "template" directory
should be-- it's a simple patch, but allowed me to make sure that
under no circumstances would xwiki go looking for things in the
default template directory.

So I'll take a look @ what's coming, and we'll try to be better at
submitting patches, etc. as we upgrade. There was only one of me last
time around, and not enough clock..



--
'Waste of a good apple' -Samwise Gamgee
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

vmassol
Administrator

On Feb 11, 2008, at 8:58 PM, Erin Schnabel wrote:

> On Feb 10, 2008 1:03 PM, Vincent Massol <[hidden email]> wrote:
> ...
>>
>> You're touching here at XWiki core structure and it's not never a  
>> good
>> thing to change that unless you completely understand what it means.
>> In the same way you can delete lots of jar files in the WEB-INF/lib
>> dir but if you do you'll find one day that when you use such and such
>> plugin it doesn't work.
>>
>> Thanks
>> -Vincent
>
> This is my issue with the albatross skin in general. It assumes a
> three panel layout that doesn't fit our corporate guidelines. (i.e.
> per our guidelines, the content always renders first: so you end up
> with the content, then the right side, then the left side).  If you
> just brought all of the *.vm files from albatross into the templates
> directory, I would still be broken.. I have to go and update view,
> edit, inline -- any of the template documents that render the basic
> layout of the page.

We have a 2 steps strategy:

Step 1: Do the minimal cleaning, i.e. move the Albatross templates in  
the templates/ dir as is, with the limitation it has.
Step 2: Implement the new skin/interface extension proposal which is  
currently being drafted before being proposed to the list:
http://dev.xwiki.org/xwiki/bin/view/Design/InterfaceExtensions

We would be very interested to get your feedback on the Interface  
Extension proposal.

Thanks
-Vincent

> I have a patch (which I should submit, because I don't think I did),
> that allows you to specify what the default "template" directory
> should be-- it's a simple patch, but allowed me to make sure that
> under no circumstances would xwiki go looking for things in the
> default template directory.
>
> So I'll take a look @ what's coming, and we'll try to be better at
> submitting patches, etc. as we upgrade. There was only one of me last
> time around, and not enough clock..

_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

Sergiu Dumitriu-2
In reply to this post by ebullient
Erin Schnabel wrote:

> On Feb 10, 2008 1:03 PM, Vincent Massol <[hidden email]> wrote:
> ...
>> You're touching here at XWiki core structure and it's not never a good
>> thing to change that unless you completely understand what it means.
>> In the same way you can delete lots of jar files in the WEB-INF/lib
>> dir but if you do you'll find one day that when you use such and such
>> plugin it doesn't work.
>>
>> Thanks
>> -Vincent
>
> This is my issue with the albatross skin in general. It assumes a
> three panel layout that doesn't fit our corporate guidelines. (i.e.
> per our guidelines, the content always renders first: so you end up
> with the content, then the right side, then the left side).  If you
> just brought all of the *.vm files from albatross into the templates
> directory, I would still be broken.. I have to go and update view,
> edit, inline -- any of the template documents that render the basic
> layout of the page.

But this is the way albatross does things, too. The panels are rendered
after the content. Finch was doing it the other way around.

>
> I have a patch (which I should submit, because I don't think I did),
> that allows you to specify what the default "template" directory
> should be-- it's a simple patch, but allowed me to make sure that
> under no circumstances would xwiki go looking for things in the
> default template directory.
>
> So I'll take a look @ what's coming, and we'll try to be better at
> submitting patches, etc. as we upgrade. There was only one of me last
> time around, and not enough clock..
>

--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: Is templates directory required any more?

ebullient
On Mon, Feb 11, 2008 at 3:45 PM, Sergiu Dumitriu <[hidden email]> wrote:

> Erin Schnabel wrote:
>  > On Feb 10, 2008 1:03 PM, Vincent Massol <[hidden email]> wrote:
>  > ...
>  >> You're touching here at XWiki core structure and it's not never a good
>  >> thing to change that unless you completely understand what it means.
>  >> In the same way you can delete lots of jar files in the WEB-INF/lib
>  >> dir but if you do you'll find one day that when you use such and such
>  >> plugin it doesn't work.
>  >>
>  >> Thanks
>  >> -Vincent
>  >
>  > This is my issue with the albatross skin in general. It assumes a
>  > three panel layout that doesn't fit our corporate guidelines. (i.e.
>  > per our guidelines, the content always renders first: so you end up
>  > with the content, then the right side, then the left side).  If you
>  > just brought all of the *.vm files from albatross into the templates
>  > directory, I would still be broken.. I have to go and update view,
>  > edit, inline -- any of the template documents that render the basic
>  > layout of the page.
>
>  But this is the way albatross does things, too. The panels are rendered
>  after the content. Finch was doing it the other way around.
>

It still didn't fit our guidelines, which mandate what things are
called, how big they are, and in what combination things can be
displayed (sounds restrictive, I know, but things are very consistent,
which was the intent).  So, I have to go through the templates, and
rename the divs and ids, and strip out assumptions about which is
nested/contained in what...  There are assumptions, for example, that
the right sidebar on edit/admin screens is rendered inside the content
form... with our page layouts, that isn't the case, so things like the
DocumentInfo panel don't work as expected w/o us twiddling with them
(XAPANELS-14).

Many of the forms (getTextArea as the method, I think) serves up the
generic name/id of "content" also, which is used by our corporate
internet for other reasons... so I have to go tweak the code and
templates to change that to something else, too.

I'll take a look @ the InterfaceExtensions page...

>
>  >
>  > I have a patch (which I should submit, because I don't think I did),
>  > that allows you to specify what the default "template" directory
>  > should be-- it's a simple patch, but allowed me to make sure that
>  > under no circumstances would xwiki go looking for things in the
>  > default template directory.
>  >
>  > So I'll take a look @ what's coming, and we'll try to be better at
>  > submitting patches, etc. as we upgrade. There was only one of me last
>  > time around, and not enough clock..
>  >
>
>  --
>  Sergiu Dumitriu
>  http://purl.org/net/sergiu/
>
>
> _______________________________________________
>  devs mailing list
>  [hidden email]
>  http://lists.xwiki.org/mailman/listinfo/devs
>



--
'Waste of a good apple' -Samwise Gamgee
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs