[All Adaptavist Apps]
Under Consruction
The create-child macro is used for automatically creating child pages....
{create-child:Child Page Name}
the "Ver" column shows which version of Theme Builder the parameter became available in.
Property |
Required |
Default |
Notes |
Theme Panels Only |
Ver |
---|---|---|---|---|---|
default |
None |
The name of the child page to be created (if it already exists in the space but is not a child of the current page then a number will be appended) |
|
|
|
template |
none |
template - the name of the template to apply to the child page
|
|
|
|
render |
false |
Whether to render the child page after it has been generated (can be used to trigger nested {create-child} macros) |
|
|
|
parent |
@self |
The parent page
|
|
|
To follow
To follow
None at present.
None at present.
11 Comments
Unknown User (jbrown@interthinx.com)
Does this macro link you right into a create new page screen where they can enter in the body, title, and labels?
Unknown User (amoran)
No, it creates the child page using the page title you specify in the macro.
Unknown User (amoran)
Some useful info in this forum post: Create-Child to create directory structure
Unknown User (orgetex)
Is it possible to create child as live-tamplate (boiler-template)?
If so: what parameter has to be added?
Unknown User (amoran)
Create a confluence template that contains {live-template:XXX} & use that in the normal way.
Unknown User (orgetex)
Thanks, this is useable as an workaround.
Disadvantage is that this would double my big number of already existing templates.
Please post how much I have to "donate" that you include boilerplate functionality as it is already available within create-page macro. I expect this not to be a "big deal".
I already have a number of projects to be programed by Adaptavist and I would like to add this to my list of upcomming orders. (you know my e-mail address)
Unknown User (amoran)
If you have a number of alterations you wish to make then I'd suggest enquiring about a time-account, that way you only need one PO and we would be able to work our way through your wish-list at your priority & requirements.
I suspect that adding live-template support would be a fairly simple task, the majority of the time required will be taken up with setting up the integration & unit tests.
There is actually an alternate path to using confluence templates which I forgot to mention, you can also setup XXXX.wiki resources in a builder layout & refer to them using the LAYOUTID::XXXX.wiki syntax. (note the double colons '::')
This would effectively hide the intermediate templates from your end users as well as allowing them to be used with compound-menuitem, eg:
Which would allow you to create links for adding pages to the specified parent (or the current page if you omit the parent param), once the page is added you will end up in 'view' mode allowing you to enter the scaffold data.
Unknown User (orgetex)
Thanks for your reply and offer – I do prefer a fixed PO – an open time-account PO could show up as an never ending story. I could also help on testing.
I use lots of macros from Adaptavist but I did not manage jet to use theme-builder – I guess I would have to use builder themes to be able to use compound-menuitem.
What I actually like to achieve is automatic creation of a number nested pages. I use one template to start that includes a number live-templates etc.. If the first page has ben created all of the other needed pages with all predefined content are created too.
I do now use user-macros instead of templates. Templates are still in use but they include just user-macros and they do include the changeable code instead. This is not neat but it works and I am still interested to know final costs of a neat way to achieve what I need.
Unknown User (amoran)
You should be able to use compound-menuitem without builder as the current theme, however you will need to specify the layout id that contains the .wiki resources.
Time accounts are usually for a fixed number of hours, the account is only extended when you add another PO for another fixed set of hours - this works well for large corporates who need a fixed price for their accounts, but allows the people on the ground to decide what that time gets spent on.
Unknown User (mroff@hemispheregps.com)
If you don't use the render=true option (or if you do and it doesn't work) is there a way to automatically render each of the pages and any subsequent nested pages after the create-child macro has been used?
Unknown User (pascal@bronzsoft)
Hi,
this is exectly what we need. But we found a proplem that makes it impossible to use it:
We tried that in multiple installations now.
At first create-child works normally like it should.
In the most cases the error occured if we used create-child(Theme Builder) and live-template(Scaffolding) in one page/template.
After saving a page with these two macros we got an "Page not Found"-error.
A look at the new pages revealed that the subpage (created by create-child) was created but not the page which includes this macro.
After this happened create-child causes the "Page not Found"-error every time it is used (even without live-template) and doesn't even create any page anymore.
It seems like create-child got broken.
The error seems to only affect the current space.
We found out that create-child worked fine in the other spaces until we tried to use it with live-template there.
We also got at least one case where no live-template was used
After that error there also occured strange acces problems like:
You do not have the rights to acces this page!
You are currently logged in as admin.
After loading the page a second time we got acces.
I don't know if this has anything to do with the error caused by the create-child-macro but it didn't happen before it.