URL 1 - /pages/createpage-entervariables.action?spaceKey=XXX&title=XXX&linkCreation=true&fromPageId=xxx&templateId=xxx
URL 2 - /pages/createpage.action?spaceKey=XXX&title=XXX&linkCreation=true&fromPageId=xxx&templateId=xxx
I would like to understand the difference between createpage-entervariables.action and createpage.action. I am trying to add a link to a page which will create a page if not exists, but will just behave like a link if it already exists. URL 2 above, the one with createpage.action does that, but it does not take in a parameter to specify template, it ignores templateId=xxx parameter. The createpage-entervariables.action (URL 1) does take the parameter templateId=xxx, but it always tries to create a new page, even if the one with the title exists.
I would like to know if there is a way createpage-entervariables.action can behave like createpage.action with respect to create behavior (that is create only if not exists) or for createpage.action to take the template as a parameter.