As a user, I would like the live template macro to create a new page under the source parent page rather than the current page

A page (let's call this TestPage) from SPACE-A is set up as the following:

  • Add a Include Page Macro. Inside this macro, include a page (let's call this page1)
  • Add a Live Template Macro.  Inside this macro, include a page (let's call this page1)

See TestPage.png for the setup

Therefore, both of the macro contains the same page (page1). IMPORTANT: The "page1" is located under SPACE-B

Inside page1, it contains the following:

  • link-page macro contains a global template
    • The parent field is set to @self (meaning self to Space B)

See Page1.png and self.png.

------

Now access the TestPage again.  There will be two links to create a new page from a template. 

When clicking on the link to the include-page macro, the new page is created on the Source parent page and source space (Space B)

On the other hand, when clicking on the link to the live-template macro, the new page is created on the current page and current space (SPACE A)

See behaviour.png

------

This idea is for the live-template macro to create the new page on the source page (and source space) instead of the current page. 

 

  • Immanuel Siagan
  • Dec 26 2018
  • Needs review
  • Attach files
  • Eidar Tøllefsen commented
    December 31, 2018 08:45

    My main idea is:

    I would like to :

    1. Create master page (PageA1)  and a master template page (PageA2) in Space A

    2. Create a page (PageB1) in Space B, where I add the "Live Template Macro" and  the source type of page template to import and render is set to "Page" and the  source (name of the page to import and render) = PageA1

    3. In the master page (PageA1) I will insert a "link-page macro" (Link text = Create new page ) contains source type = page (not a Global Template), and source = PageA2

    4. From PageB1 I whant to use the link "Create new page" under the current page "pageB1"

     

    My second idea is

    Use the "include page macro" instead of "the live template macro" - else the same. (In this case the new page now will be crated on the source space A , and that's not what I want)

    Best regards

    Eidar