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


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 5 guests