You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello!
I have a parent page named "page 1".
On it I want to place the "Create from template" button.
At the same time, I need that when the "Create from template" button is pressed, a child page is created with a pre-filled title, for example (Documentation + page 1). That is, the title of the child page should automatically fill in the title with two variables, this is an arbitrary text + the title of the parent page.
What solutions are currently available? How can I implement it?
Hi @Deniz Perz are you on an on-prem instance? If so you can achieve this with ScriptRunner for Confluence and our 'Create Page' macro as mentioned by Patrick above.
In our documentation, there is a short 1:30min video that will give you a demo of what the macro does. You can watch it to see if it meets your needs. https://docs.adaptavist.com/sr4c/latest/features/macros/built-in-macros/create-page.
ScriptRunner for Confluence is available for a 30-day free trial if are interested in testing it out. https://marketplace.atlassian.com/apps/1215215/scriptrunner-for-confluence?tab=overview&hosting=cloud
Any other questions feel free to ask!
Hi @Jessie Wang_ScriptRunner_The Adaptavist Group , I have ScriptRunner for Confluence (server) and exploring the possibilities with extending the "Create Page" macro by ScriptRunner.
My goal is to create a new page from a template while passing a custom variable $myVariable to the content body from page template. At the same time the page title uses $myVariable as a prefix.
1. Is it possible to create a custom class to extend the CreatePageMacro? I've not been able to succeed as described in Customising Macro Variables. Do you have any code examples?
2. Is it possible to grab a value from a table in a current Confluence and pass it on to CreatePageMacro?
otherwise,
3. Can the value from <Prompt Title> in "Create Page" macro be passed to a page template?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not think this is possible with the 'Create from template' macro.
We have the Scriptrunner for Confluence add-on, that has a 'create page' macro with lots of possibilities.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patrick Vanhoof, do you know I can create a new page from a template while passing a custom variable $myVariable to the template to generate content? At the same time the page title uses $myVariable as a prefix, how can this be done without having to enter the value twice for $myVariable? Can this be achieved using the "Create Page" macro by ScriptRunner ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marianne Lee , the variable in the template works as with the create from template macro, you get a screen first where you enter the variabler value.
But as far as I can see, the use of that variable in the Create page macro is not possible. Correct, @Jessie Wang_ScriptRunner_The Adaptavist Group ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.