Forums

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

Access custom plugin method from velocity

Chris Pearlman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 5, 2018

Hello,

I am trying to write a custom plugin for Confluence and make a method return value (a string) available for use in the main default velocity template. I have setup a quick test plugin and here is my main class:

 

public class MyPluginComponentImpl {

public String testVelocityCall() {
System.out.println("testVelocityCall Works!");
return "thisworks";

}

}

 

I've tried to call that method in velocity with:

 

$action.testVelocityCall() 

 

But I cannot not get it to render the return value or even to trigger that method. Any help would be much appreciated. Thanks!

 

--Chris

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events