[xwiki-users] Displaying Database List Properties as links to XWiki pages ?
Hello all, I have a Database List which items are XWiki pages. Is there a way to make these items displayed as links so that one can access the related page by clicking on it? Thanks in advance, Sylvain
Since XWiki 4.3 you have the page field which is the same and should do that. If you don't want to change the field type you can write a custom displayer that you add in your field definition. Ludovic Le 26 juin 2015 8:29 AM, "Sylvain MARIE" <sylvain.marie@vtreem.com> a écrit :
Hello all,
I have a Database List which items are XWiki pages. Is there a way to make these items displayed as links so that one can access the related page by clicking on it? Thanks in advance, Sylvain _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Hello, The following query counts documents by publication date. {{velocity}} ## Count all publication dates #set($results=$services.query.xwql("select guide.DocumentDate, count(guide.DocumentDate) from Document doc, doc.object(BIMGuides.GuideClass) as guide group by guide.DocumentDate order by guide.DocumentDate").execute()) PublicationDate,Count #foreach($result in $results) #set($resDate = $result.get(0)) #set($resString = $resDate.toString().substring(0, 10)) $resString,$result.get(1) #end {{/velocity}} I would like to regroup publication dates by year (getting « 2014,3 » when 2 documents are published in Jan2014 and 1 in Oct2014) instead of getting all single dates. Any idea ? Thank you in advance! Sylvain
Unfortunately extracting the year of a date field is not supported by XWQL. See http://jira.xwiki.org/browse/XWIKI-6645. On Wed, Sep 23, 2015 at 12:01 PM, Sylvain MARIE <sylvain.marie@vtreem.com> wrote:
Hello,
The following query counts documents by publication date. {{velocity}} ## Count all publication dates #set($results=$services.query.xwql("select guide.DocumentDate, count(guide.DocumentDate) from Document doc, doc.object(BIMGuides.GuideClass) as guide group by guide.DocumentDate order by guide.DocumentDate").execute()) PublicationDate,Count #foreach($result in $results) #set($resDate = $result.get(0)) #set($resString = $resDate.toString().substring(0, 10)) $resString,$result.get(1) #end {{/velocity}}
I would like to regroup publication dates by year (getting « 2014,3 » when 2 documents are published in Jan2014 and 1 in Oct2014) instead of getting all single dates.
Any idea ?
Thank you in advance! Sylvain
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
Hi Sylvain, On 23 Sep 2015 at 13:05:18, Thomas Mortagne (thomas.mortagne@xwiki.com(mailto:thomas.mortagne@xwiki.com)) wrote:
Unfortunately extracting the year of a date field is not supported by XWQL. See http://jira.xwiki.org/browse/XWIKI-6645.
As a workaround you could maybe use HQL, see http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples#HAdvan... Thank -Vincent
On Wed, Sep 23, 2015 at 12:01 PM, Sylvain MARIE wrote:
Hello,
The following query counts documents by publication date. {{velocity}} ## Count all publication dates #set($results=$services.query.xwql("select guide.DocumentDate, count(guide.DocumentDate) from Document doc, doc.object(BIMGuides.GuideClass) as guide group by guide.DocumentDate order by guide.DocumentDate").execute()) PublicationDate,Count #foreach($result in $results) #set($resDate = $result.get(0)) #set($resString = $resDate.toString().substring(0, 10)) $resString,$result.get(1) #end {{/velocity}}
I would like to regroup publication dates by year (getting « 2014,3 » when 2 documents are published in Jan2014 and 1 in Oct2014) instead of getting all single dates.
Any idea ?
Thank you in advance! Sylvain
participants (4)
-
Ludovic Dubost -
Sylvain MARIE -
Thomas Mortagne -
vincent@massol.net