Thanks Marius, it worked, but I noticed I made a terrible mistake by trying to use a field to show the version and use the field on the Livetable of the App.
Because it versioned ALL my pages created with the app, when they got a new field. Not sure it’s possible to return the version.
But anyway, as I want to show version of other pages in other AWM apps, I need to show the version without adding a field.
And I am failing at that.
So what I did was getting into the app main page (with the livetable) and editing it in Wiki mode.
It shows the velocity code for the table.
I changed it to be like this
{{velocity}}
#set ($columnsProperties = {
'doccode': {},
'doc.title': {"link":"view"},
'doc.version': {},
'departamentoResponsavel': {"html":true},
'doc.creationDate': {},
'doc.date': {},
'doc.author': {"link":"author"},
'_actions': {"sortable":false,"filterable":false,"html":true,"actions":["edit","delete"]}
})
#set ($options = {
'className': 'Procedimentos.Code.ProcedimentosClass',
'translationPrefix': 'procedimentos.livetable.',
'tagCloud': true,
'rowCount': 15,
'maxPages': 10,
'selectedColumn': 'doccode',
'defaultOrder': 'asc'
})
#set ($columns = ['doccode', 'doc.title', 'doc.version', 'departamentoResponsavel', 'doc.creationDate', 'doc.date', 'doc.author', '_actions'])
#livetable('procedimentos' $columns $columnsProperties $options)
{{/velocity}}
Notice the third column is doc.version
However, the version doesn´t show and the title of the column gets all wrong
