Hi Brett,

On 19 Nov 2014 at 18:25:26, Brett Gersekowski 
([email protected](mailto:[email protected])) wrote:

> I'm in the process of transferring a reasonable number of "Tip of the Day" 
> articles that we've previously distributed by email to store on the Wiki. 
> Ideally, I'd like to display them in a Documents list using the Dashboard 
> macro and Documents gadget and have the date that they were first published 
> as one of the columns in the document list. Note that the publication date 
> should reflect the date that the tip was first sent out as an email, not the 
> date that I'm now transferring the text to the Wiki, which is today (ie. 
> November, 2014). Some of these articles go back as far as September, 2011. I 
> think I'd also like to avoid messing with the revision history dates on these 
> articles. I think the publication date should be a field independent of the 
> needs of the Wiki and it's revision tracking mechanisms, even if there is a 
> supported way of fiddling with such things.
>  
> I've been able to associate a CreationDate property with each article via the 
> following process:
>  
> 1. Create a Hidden "Tip of the Day" page.
> 2. Edit the class of the "Tip of the Day" page and add a Date property called 
> CreationDate.
> 3. On each Tip of the Day article, edit the objects, add a "Tip of the Day" 
> object and store the creation date in the CreationDate property on that 
> object.
>  
> What I can't seem to figure out is if I can display this as a column in the 
> Documents gadget of a dashboard and if so how.

You just need to use the livetable macro pass your xclass (className option 
name), see:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro

> The Documents gadget does have a columns property which takes a 
> comma-separated list of column specifications such as doc.name, doc.date, 
> doc.author and the like. Is there are way to specify the CreationDate on the 
> attached Tip of the Day object as a column in this list?

No. The Document macro uses the livetable macro under the hood but only based 
on metadata available on documents (name, date, author, etc).

> Alternatively, is there a better way to go about this?

Just use the livetable macro and you’re good.

Alternatively you could reuse the Blog application and its BlogPostClass since 
this class has a publish field already. You’d then use the livetable macro to 
display all pages with a BlogPostClass xclass (filtering in a given space for 
example).

Thanks
-Vincent

> Brett Gersekowski

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to