I guess something went wrong, so second try.
Hi. We like to collect some information within a form from a template. The global blueprint contains the vars the worker should fill with information. The user goes to the main page and hit a link. An assistant opens and the worker can choose the right Form. The Site is created from the Blueprint. Then a user macro fills the Heading like that:
This is necessary, because just the time makes the form unique!
Because it wasn't possible for me to make a Blueprint with Heading containing: Date AND Time, (with the official macro: "Add New Page From Template" you could only add @currentDate, no time), I tried to write my own user macro and it works for me as Confluence Admin. But the Confluence users aren’t allowed to call some function?!? We need that, because if a worker had to do two or more times these steps, the first Site of the day will be overwritten (without warning). I’am not a Programmer… but was able copy together some lines from the Community.
## @noparams #set($wikibaseurl = "${req.getContextPath()}") #set($templateid="3932192") #set($fromspacekey=$space.getKey()) #set($frompage=$content.getTitle()) #set($newspacekey=$wikibaseurl) #set($templatename=$paramtemplate) #set($title=" Fehlerprotokoll vom: " + $action.dateFormatter.formatGivenString("dd-MMM-yyyy hh:mm:ss", $content.currentDate) + " test") ##(blueprint) <a href='$wikibaseurl/pages/createpage-choosetemplate.action?title=$title&templateName="ETH-Fehlerprotokoll global"&templateId=$templateid&linkCreation=false&spaceKey=$fromspacekey&newSpaceKey=$newspacekey&fromPageId=65831'>$body</a>
How could I adapt the code, in that way, a Confluence user is able to add a new form from Blueprint without Admin rights? Sure, I know that there a lot of commercial Add Ons, but this had to work without.
Thanks
My Solution:
I found a free Addin named Linking witch has the {add-page-form} macro. This is exactly waht we searched for.
This was the first Addin i installed witch made a restart on the server instance necessary.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.