The code of this document Wiki Content block is based on the example provided in the Advanced Querying section of Polarion Help.
However, the example code only shows the baselines for the current document location and name (ID). Consequently, previous baselines where the document had a different name or resided in a different location, are not displayed. Furthermore, baselines of other documents that used to have the document's current name would be displayed.
The code of this document Wiki Content block solves these two issues. It considers all previous document locations and names and also filters out baselines of other documents.
The document panel contains the baseline name, a link to the document revision, the revision number, and the time and date of the baseline.
The rendering section of the code can be modified to make the panel show the details that you need.