Good morning,
I wanted to create a kind of bibliographic data base.
To do that I create a "Document" class which have some properties (title,
autor, year...) and each of its page "objects" would have an attachment (for
instance, a pdf of an scientific article) which correspond to the document.
Then, I use the Live Table to display all my class objects but I have some
problems I can't resolve... I put the code of my Live Table at the bottom of
the mail.
So, obsiously, I have a template attached to my class which contains an
object of it. My problem is when I display in my Live Table all my
"Document" class pages (with the option :
"className":"Biblio.DocumentClass"), the template is also display. I
would
like it doesn't. Is there a way to do that ?
Secondly, I have a column in my Live Table to display attachment (with
"_attachments") but i don't find how to link to the download link. Indeed,
i'm not sur it's possible !! I try to put the option "link" :
"view" and
"link" : "field" but the first link to the document page and the
second
doesn't work.
Finally, it's about the class creation. I create a date property but I don't
want to have a default today date. I notice the field "Empty is today". But
whenever I put 0 or 1 or nothing, there always is the default today date in
the form creation...
Thank you.
Marine
My Live Table code ("TitleDoc", "Autor", "Year are properties of
my
Biblio.DocumentClass) :
#set($columns = ["TitleDoc",
"Autor", "Year", "_attachments", "doc.date",
"doc.author", "_actions"])
#set($columnsProperties = {
"TitleDoc" : { "type" : "text", "link" :
"view"},
"Autor" : { "type" : "text", "link" :
"view"},
"Year" : { "type" : "number", "link" :
"view"},
"_attachments" : { "type" : "none",
"sortable" : "false", "link" :
"view"},
"doc.date" : { "type" : "text", "link" :
"view"},
"doc.auth" : { "type" : "text", "link" :
"field"},
"_actions" : { "actions":
["delete","rename"]}
})
#set($options = {
"className":"Biblio.DocumentClass",
"rowCount": 10
})
#livetable("BDbiblio" $columns $columnsProperties $options)