Re: [xwiki-users] TOC from other Page

2016-09-26 Thread Vincent Massol
Hi,

> On 26 Sep 2016, at 18:26, Tomáš Skála  wrote:
> 
>> You should try it (even if not for this use case), just to see/feel the 
>> power of it.
> 
> we will need organized lists with records soon, so we certainly will :) 
> 
>> FYI I’ve fixed and committed http://jira.xwiki.org/browse/XRENDERING-240.
>> You could get it by using a snapshot build, see
>> http://www.xwiki.org/xwiki/bin/view/Download/DownloadOther/
> 
> Thanks again. It will be in the next 8.3 milestone/release I guess? I 
> personally don't have installation in my hands and our administrators are 
> reluctant to install hot versions (hoping RC won't be such problem since we 
> need it). 

XWiki 8.3RC1 has just been released now! :)

FYI, the final version (8.3 final) is planned to be released on the 10th of 
October.

Thanks
-Vincent

> TS

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC from other Page

2016-09-26 Thread Tomáš Skála
> You should try it (even if not for this use case), just to see/feel the power 
> of it.

we will need organized lists with records soon, so we certainly will :) 

> FYI I’ve fixed and committed http://jira.xwiki.org/browse/XRENDERING-240.
> You could get it by using a snapshot build, see
> http://www.xwiki.org/xwiki/bin/view/Download/DownloadOther/

Thanks again. It will be in the next 8.3 milestone/release I guess? I 
personally don't have installation in my hands and our administrators are 
reluctant to install hot versions (hoping RC won't be such problem since we 
need it). 

TS

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC from other Page

2016-09-25 Thread Vincent Massol
Hi,

> On 25 Sep 2016, at 13:12, tskala  wrote:
> 
> that {{context}} sounds like great solution for the needs. 
> 
> I thought about classes/objects before but it seemed like it would only
> obfuscate texts making editability harder for no real gain (like replacing
> wiki editor with simple text field for method description). 

You also have a textarea xproperty type which offers either the wiki editor or 
the wysiwyg editor.

> Descriptions are heavily formatted, with its own signatures, macros and
> examples (preview required). With "edit" button for each heading it makes
> things nice and easy. Wiki itself is good way to make articles, compatible
> with internal code commentaries/intellisense.  

You get something similar with forms and the edit button which is wired 
automatically to edit the form.

> Life table, while it might solve merging records from multiple pages (not
> clue how)

It just queries all pages having xobjects of a given xclass, see 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro

> is quite worse then TOC (filtering method names is never required,
> finding them with browser Ctrl+F works perfectly if needed and TOC takes
> only fraction of space life table does so overview is more clear). 

Using the “TOC-way” is what you’d use in a standard first generation wiki 
(because there’s nothing else). In XWiki you are able to go much further with 
applications built using xclass, xobjects and xproperties. You should try it 
(even if not for this use case), just to see/feel the power of it.

> Normally it would deserve it's own customized application. But that is the
> part we chose to use wiki pages we have. 

Your choice, I can only make suggestions ;)

FYI I’ve fixed and committed http://jira.xwiki.org/browse/XRENDERING-240. You 
could get it by using a snapshot build, see 
http://www.xwiki.org/xwiki/bin/view/Download/DownloadOther/

Thanks
-Vincent

> View this message in context: 
> http://xwiki.475771.n2.nabble.com/TOC-from-other-Page-tp7601369p7601379.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC from other Page

2016-09-25 Thread tskala
that {{context}} sounds like great solution for the needs. 

I thought about classes/objects before but it seemed like it would only
obfuscate texts making editability harder for no real gain (like replacing
wiki editor with simple text field for method description). 

Descriptions are heavily formatted, with its own signatures, macros and
examples (preview required). With "edit" button for each heading it makes
things nice and easy. Wiki itself is good way to make articles, compatible
with internal code commentaries/intellisense.  

Life table, while it might solve merging records from multiple pages (not
clue how) is quite worse then TOC (filtering method names is never required,
finding them with browser Ctrl+F works perfectly if needed and TOC takes
only fraction of space life table does so overview is more clear). 

Normally it would deserve it's own customized application. But that is the
part we chose to use wiki pages we have. 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/TOC-from-other-Page-tp7601369p7601379.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC from other Page

2016-09-24 Thread Vincent Massol
Hi tskala,

FYI I’ve researched it a bit more and I was able to patch the Context Macro to 
make it work with the toc macro.

See 
http://jira.xwiki.org/browse/XRENDERING-240?focusedCommentId=92733=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-92733

Example usage:

{{context document="Sandbox.WebHome"}}
{{toc/}}
{{/context}}

Now I'd need to research it a bit more to make sure my quick patch is correct 
(+ write unit tests for it).

All that said, if you could use some structure/xclass as I mentioned in my 
previous reply, I think you’d be able to go further.

Thanks
-Vincent

> On 25 Sep 2016, at 00:51, Vincent Massol  wrote:
> 
>> 
>> On 24 Sep 2016, at 23:50, tskala  wrote:
>> 
>>> http://jira.xwiki.org/browse/XRENDERING-240
>> 
>> not exactly sure but sounds like it would solve it. (Your comment about
>> {{context}} macro sounds actually better. It could help with more things
>> then just this.) 
>> 
>>> Could you explain your need since there may be other ways of achieving it? 
>> 
>> I would like to document widgets for our framework. And now I'm trying to
>> deal with occasional inheritance. Reasonably easy to write for authors and
>> readable for implementators. 
>> 
>> I changed TOC style so it looks similar to QuickNav here:
>> http://api.jqueryui.com/dialog/
>> 
>> The "working" idea is to use one {{include}} for each property/method of
>> base class. That way  inherited content is shown on subclass page, TOC is
>> ok, and we are happy. Downside is it requires to copy all those includes
>> several times (base is heavy). And if there is new property/method in base
>> class it is required to manually copy it into all descendants (not that many
>> but still). 
>> 
>> So I was thinking. If I could just get TOC for base class into subclass
>> page, it might be much better and easier. It would be always "up-to-date",
>> you would see what makes subclass different, and if you click the base class
>> TOC it will just take you to the base page heading, seeing all related
>> properties/methods together. 
>> 
>> So my closest idea was something like this:
>> 
>> {{display reference="baseClassPage" section="HbaseClass"/}}
>> 
>> === subClass ===
>> {{TOC /}}
> 
> I’m not entirely sure I fully understand but I think the canonical way of 
> doing this with XWiki is by creating some structure with xclasses, xobjects 
> and xsheets.
> 
> Basically you create an xclass to represent a widget. You can also have an 
> xclass to represent a widget method (name + description + etc).
> 
> Then on the home page, you use (for example) a LiveTable to display all 
> methods for all widgets. This gives you a nice searchable/filterable TOC :)
> 
> WDYT?
> 
> Thanks
> -Vincent
> 
>> View this message in context: 
>> http://xwiki.475771.n2.nabble.com/TOC-from-other-Page-tp7601369p7601371.html
>> Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC from other Page

2016-09-24 Thread Vincent Massol

> On 24 Sep 2016, at 23:50, tskala  wrote:
> 
>> http://jira.xwiki.org/browse/XRENDERING-240
> 
> not exactly sure but sounds like it would solve it. (Your comment about
> {{context}} macro sounds actually better. It could help with more things
> then just this.) 
> 
>> Could you explain your need since there may be other ways of achieving it? 
> 
> I would like to document widgets for our framework. And now I'm trying to
> deal with occasional inheritance. Reasonably easy to write for authors and
> readable for implementators. 
> 
> I changed TOC style so it looks similar to QuickNav here:
> http://api.jqueryui.com/dialog/
> 
> The "working" idea is to use one {{include}} for each property/method of
> base class. That way  inherited content is shown on subclass page, TOC is
> ok, and we are happy. Downside is it requires to copy all those includes
> several times (base is heavy). And if there is new property/method in base
> class it is required to manually copy it into all descendants (not that many
> but still). 
> 
> So I was thinking. If I could just get TOC for base class into subclass
> page, it might be much better and easier. It would be always "up-to-date",
> you would see what makes subclass different, and if you click the base class
> TOC it will just take you to the base page heading, seeing all related
> properties/methods together. 
> 
> So my closest idea was something like this:
> 
> {{display reference="baseClassPage" section="HbaseClass"/}}
> 
> === subClass ===
> {{TOC /}}

I’m not entirely sure I fully understand but I think the canonical way of doing 
this with XWiki is by creating some structure with xclasses, xobjects and 
xsheets.

Basically you create an xclass to represent a widget. You can also have an 
xclass to represent a widget method (name + description + etc).

Then on the home page, you use (for example) a LiveTable to display all methods 
for all widgets. This gives you a nice searchable/filterable TOC :)

WDYT?

Thanks
-Vincent

> View this message in context: 
> http://xwiki.475771.n2.nabble.com/TOC-from-other-Page-tp7601369p7601371.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC from other Page

2016-09-24 Thread tskala
> http://jira.xwiki.org/browse/XRENDERING-240

not exactly sure but sounds like it would solve it. (Your comment about
{{context}} macro sounds actually better. It could help with more things
then just this.) 

> Could you explain your need since there may be other ways of achieving it? 

I would like to document widgets for our framework. And now I'm trying to
deal with occasional inheritance. Reasonably easy to write for authors and
readable for implementators. 

I changed TOC style so it looks similar to QuickNav here:
http://api.jqueryui.com/dialog/

The "working" idea is to use one {{include}} for each property/method of
base class. That way  inherited content is shown on subclass page, TOC is
ok, and we are happy. Downside is it requires to copy all those includes
several times (base is heavy). And if there is new property/method in base
class it is required to manually copy it into all descendants (not that many
but still). 

So I was thinking. If I could just get TOC for base class into subclass
page, it might be much better and easier. It would be always "up-to-date",
you would see what makes subclass different, and if you click the base class
TOC it will just take you to the base page heading, seeing all related
properties/methods together. 

So my closest idea was something like this:

{{display reference="baseClassPage" section="HbaseClass"/}}

=== subClass ===
{{TOC /}}



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/TOC-from-other-Page-tp7601369p7601371.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC from other Page

2016-09-24 Thread Vincent Massol
Hi Tskala,

> On 24 Sep 2016, at 14:35, tskala  wrote:
> 
> Probably easy for someone familiar with API.

Actually it’s not that easy ;)

We have an open issue for implementing this (if we’re talking about the same 
thing):
http://jira.xwiki.org/browse/XRENDERING-240

So you wish to display the TOC for another page but without including that 
other page’s content, is that it?

Could you explain your need since there may be other ways of achieving it?

Thanks
-Vincent

> How can I display TOC from other page? Played with {{include}}, {{display}},
> {{context}} but none gives results. ( {{display}} is close if it had
> original page as a context instead of "new".) All I get is heading and empty
> (or current page) TOC. 
> 
> There must be a way with some velocity based rendering and cropping specific
> header but have no idea how. 
> 
> Thanks
> 
> 
> 
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/TOC-from-other-Page-tp7601369.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users