User Macro to show children pages with lastupdate and Metadata
Asked by Christian Englbrecht:

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\>


Answers:
author: Christian Englbrecht
body: 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!!


author: Stephen Deutsch
body: 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>
```

comments: author: Christian Englbrecht
body: 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](https://avatar-cdn.atlassian.com/65406223ced5f89e3094531b37db0ad0 "Christian Englbrecht")](https://community.atlassian.com/t5/user/viewprofilepage/user-id/1157054)


author: Christian Englbrecht
body: 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.