On Fri, May 29, 2009 at 2:34 PM, Guillaume Lerouge <guilla...@xwiki.com>wrote:

> Hi Pascal,
>
> On Fri, May 29, 2009 at 2:25 PM, Pascal Voitot
> <pascal.voitot....@gmail.com>wrote:
>
> > The XWikiClassTemplate velocity script is in a XWiki/1.0 syntax doc:
> > ## replace Main with the Space where you want your documents to be
> created
> > ## replace the default parent with the one of your choice
> > ## Save this template using the 'Save' button
> > #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
> > #set($defaultparent = "kmbase.${class}Class")
> > #set($defaultweb = "kmbase")
> > #includeForm("XWiki.ClassSheet")
> >
> > but now when you create a class, it is XWiki/2.0 and should be:
> > {{velocity}}
> > {{html wiki=true}}
> > ## replace Main with the Space where you want your documents to be
> created
> > ## replace the default parent with the one of your choice
> > ## Save this template using the 'Save' button
> > #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
> > #set($defaultparent = "kmbase.${class}Class")
> > #set($defaultweb = "kmbase")
> > #includeForm("XWiki.ClassSheet")
> > {{/html}}
> > {{/velocity}}
> >
> > What's the best solution to your mind in order to have something working
> in
> > all the cases?
> >
>
> Well, since now all new documents will be created in syntax 2.0, we could
> convert the  XWiki.XWikiClassTemplate page and make it 2.0 by default in
> the
> wiki. Not sure whether this would break existing classes but I don't think
> so...
>

the scripts in XWiki/1.0 must be modified a bit to be XWiki/2.0 because they
contain a mix of velocity and html that renders bad in XWiki/2.0...
such as
<a href="$doc.getURL("edit", "xpage=editclass")">Edit the Class</a>



>
> Guillaume
>
>
> > Pascal
> > _______________________________________________
> > devs mailing list
> > devs@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
>
>
> --
> Guillaume Lerouge
> Product Manager - XWiki
> Skype ID : wikibc
> http://guillaumelerouge.com/
> _______________________________________________
> devs mailing list
> devs@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to