Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User Macro to show children pages with lastupdate and Metadata

Christian Englbrecht January 31, 2018

Hi all,

 

im trying to create a Table with 3 Headers. 

First one - Document name of the descendent pages, Header: "Name"

Second one - Time (in Days) since last page Update of the descendent page, Header: "Zeit seit letzter Aktualisierung"

Third one - Metadata of the descendent Page (Person who's competent for document), Header: "Prozessbevollmächtigter"

 

I'm not Programmer ;) Maybe you can help me.

 

Actually i got this ... but - again, im not a programmer - it could be crap ;)

 

## This is a macro for inserting a table.
## @param Cell1:type=string|desc=cell
## @param Cell2:type=string|desc=cell

<table>
<caption style="font-family:family:bliss pro light; font-size:1.1em; page-break-after: avoid;text-align:left;padding-bottom:8px;">$!paramHead1</caption>
<tr>
<th class="TableHeader" style="background-color: transparent; font-family: arial; font-size:1em;margin-bottom:-10px; margin-top:-15px;">Dokument</th>
<th class="TableHeader" style="background-color: transparent; font-family:arial; font-size:1em;margin-bottom:-10px; margin-top:-15px;">Zeit seit lezter Aktualisierung</th>
<th class="TableHeader" style="background-color: transparent; font-family:arial; font-size:1em;margin-bottom:-10px; margin-top:-15px;">Prozessbevollmächtigter</th>
</tr>
<tr>
<td>$content.getDescendents()</td>
<td>LEER3</td>
<td>LEER2</td>
</tr>
</tbody>
</table>

2 answers

0 votes
Christian Englbrecht February 2, 2018

Hey Stephen,

 

thank you very much. Now in the second column, there's the last modification date - i'd need the time (in days) SINCE the last modification date. 

 

In the thrid colum there's the Creator. In all our documents there are metadata for the competent person. (Example: Creator: Mr. X, Competent: Mrs. Y). I'd need the competent person instead of the Creator.

 

Maybe you have an idea how i can handle this.

 

Thanks a lot!!

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2018

Hi Christian,

I think this is somewhat close to what you were looking for:

## This is a macro for inserting a table.
## @param Head1:title=Header|type=string|desc=Enter header name for table

<table>
<caption style="font-family:family:bliss pro light; font-size:1.1em; page-break-after: avoid;text-align:left;padding-bottom:8px;">$!paramHead1</caption>
<tr>
<th class="TableHeader" style="background-color: transparent; font-family: arial; font-size:1em;margin-bottom:-10px; margin-top:-15px;">Dokument</th>
<th class="TableHeader" style="background-color: transparent; font-family:arial; font-size:1em;margin-bottom:-10px; margin-top:-15px;">Zeit seit lezter Aktualisierung</th>
<th class="TableHeader" style="background-color: transparent; font-family:arial; font-size:1em;margin-bottom:-10px; margin-top:-15px;">Prozessbevollmächtigter</th>
</tr>
#foreach ( $descendent in $content.getDescendents() )
<tr>
<td>#contentLink2($descendent false false)</td>
<td>$action.dateFormatter.formatDateTime($descendent.lastModificationDate)</td>
<td>$descendent.creator.fullName</td>
</tr>
#end
</tbody>
</table>
Christian Englbrecht February 18, 2018

Hey Stephen,

 

thank you very much. Now in the second column, there's the last modification date - i'd need the time (in days) SINCE the last modification date. 

 

In the thrid colum there's the Creator. In all our documents there are metadata for the competent person. (Example: Creator: Mr. X, Competent: Mrs. Y). I'd need the competent person instead of the Creator.

 

Maybe you have an idea how i can handle this.

 

Thanks a lot!!

Christian Englbrecht

Christian Englbrecht February 18, 2018

It should look like this...

 

II Document Name II 14 Days II Mr. X

 

Mr. X should not be the creator. It should be the Person who's in the metadata plugin. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events