Can a component or macro be made that will create child pages from a template? | Community
Skip to main content
October 16, 2015
Solved

Can a component or macro be made that will create child pages from a template?

  • October 16, 2015
  • 4 replies
  • 934 views

Hello,

I was wondering if there was a way to create some kind of component or macro that allows you to create a child page from the website, without having to go through the AEM or CRXDE.

Basically, I want a user to be able to go to the website and for there to be a "add new page" link or button that will allow the user to add a child page under the current one.

Any suggestions or help would be most appreciated.

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

You can have a button on page clicking of it make a post to [1] with parameters [2] like label, title, template etc.
Instead I would say use sidekick to create a button[3] called "child page".  when author click on it get required parameter & post to [1]. This is to avoid additional logic to check mode on each page to display the button.

BTB what is the problem with using site admin to create a page?

[1]   http://<host>:<port>/bin/wcmcommand

[2]

_charset_=utf-8
cmd=createPage
label=test
parentPath=/content/geometrixx/en
template=/apps/geometrixx/templates/contentpage
title=test

[3]    http://aemfaq.blogspot.com/2013/04/adding-button-to-sidekick.html

4 replies

Adobe Employee
October 16, 2015

BenjaminJines wrote...

Basically, I want a user to be able to go to the website and for there to be a "add new page" link or button that will allow the user to add a child page under the current one.

Just to clarify: by user do you mean author? Or an authenticated user on a publish instance?

October 16, 2015

An authenticated user. We want the users to be able to create a new child page without using the AEM or CRXDE.

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

You can have a button on page clicking of it make a post to [1] with parameters [2] like label, title, template etc.
Instead I would say use sidekick to create a button[3] called "child page".  when author click on it get required parameter & post to [1]. This is to avoid additional logic to check mode on each page to display the button.

BTB what is the problem with using site admin to create a page?

[1]   http://<host>:<port>/bin/wcmcommand

[2]

_charset_=utf-8
cmd=createPage
label=test
parentPath=/content/geometrixx/en
template=/apps/geometrixx/templates/contentpage
title=test

[3]    http://aemfaq.blogspot.com/2013/04/adding-button-to-sidekick.html

October 16, 2015

The reason I need to do it this way is because my boss wants users to be able to edit the content of the pages and also add new pages without using the AEM or CRXDE. I do not know why he wants it this way, but that is what he requested.