Wiki: Referencing the current page or project

Description
masoini
Posts: 9
Joined: Wed Jun 09, 2010 5:30 am

Wiki: Referencing the current page or project

Postby masoini » Wed Jun 16, 2010 12:30 pm

Hello, I've been working on some wikipages with Velocity and I cannot seem to find a way to reference the current wiki page. What I want to do is to get the project ID of the project that wiki page belongs to, so I can use the same template in different projects without having to manually alter the project ID variable I have.

The way I understand it should work is:
#set ( $projectId = $currentWikiPage.getSpace().getProjectId() ),

where $currentWikiPage would be a reference to the wiki page the viewer is currently on.

Thanks in advance.

-Matias Soini

masoini
Posts: 9
Joined: Wed Jun 09, 2010 5:30 am

Re: Wiki: Referencing the current page or project

Postby masoini » Wed Jun 23, 2010 1:29 pm

The reference I was looking for was actually '$page'. Now I can get the Project ID of the current project with the following:

$page.getSpace().getProjectId()

-Matias

Oliver.Meyer
Posts: 7
Joined: Wed Jun 10, 2015 4:11 pm

Re: Wiki: Referencing the current page or project

Postby Oliver.Meyer » Fri Sep 11, 2020 12:35 pm

In my polarion the code above did not work on a Live Report Page, but did point me in the right direction.
I used the following in Polarion 20 R1.

Code: Select all

$page.reference.projectId

I am curious if the code will still work, after I put it in the render part of a widget :)


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Google [Bot] and 21 guests