Can I create a number of page layout teamplates within the same space? Can they be auto-generated?
Asked by Tim Milner:

Hi! Basic question is: can you have a selection of different auto-generated page layouts within the same space?

Now for more detail: I have a space within which I want to create a number of templates - which one would be used would depend on what task the user within the space is carrying out. By page templates, I mean completely different column layouts - so Task 1 could involve a three-column layout. Task 2 could just have one column, and Task 3 might have one three boxes along the top, with a larger single box below it on the page. So if our user has those three tasks (Task 1, Task 2, and Task 3) which he carries out on a daily basis, and is in his space, and then goes to the landing page for where Task 2 is to be carried out (eg. raising a change request) could he create his new page, and that new page would reflect the Task 2 template (which is what I mean by auto-generated)? Following that, could he go to the page from where Task 3 is to be carried out (eg. propose a new product idea) - within the same space, remember - and then create a new page, which would reflect the template for Task 3? Is this possible? My issue is that when I create a template, it only gives me the option to layout one single box on a page and give it some headers, or add some tables etc., rather than create an entire page layout which can replicate in some areas within a space, while in other areas within that same space, people can use a template with a different page layout.

Thanks in advance for any help or suggestions. Even a "no, that's not possible" is useful, as it stops the constant searching.


Answers:
author: Kevin Buchs
body: The answer to your basic question is: Yes.

Yes, what you suggest is possible, and not that hard. Take advantage of the {create-page} macro where you can specify the template to use and then you can create hyperlinks that can themselves go in your templates to avoid the user having to remember to use a certain template.

Templates do allow full page configuration. I am not sure what is causing your issue, but you may wish to share your markup code here and we can review it.

comments: author: Tim Milner
body: Brilliant, thanks Kevin. It took me a while to get it, but so far, so good. For some reason, the template I choose in the configuration section of the macro doesn't then appear in the markup once I submit the macro. It is the only field unaccounted for, so I have been adding manually before I preview and Save the page. Is this a bug?

Does this work across spaces? ie. could I trigger a template set up in Space A within Space B, or do I need to save a template within each space?

My issue about templates not allowing full page configuration is as follows: to create a template, I go to Browse Space\>Advanced\>Templates. I then click on Create New Template, and I get a single box, with no formatting options. I can use markup to create headers and tables etc., but crucially all it does is create a template within one box of a given page. I can't for instance starts creating extra columns, dragging boxes around etc. to give a full page layout. Am I looking in the wrong place?


author: Kevin Buchs
body: Tim,

I am not able to understand what you mean by:

"the template I choose in the configuration section of the macro doesn't then appear in the markup once I submit the macro".

Could you elaborate. I'll just venture a guess that template parameters may be of interest to you: <http://confluence.atlassian.com/display/CONF35/Form+Field+Markup+for+Templates>

Templates can be space specific or global (Confluence Admin priv. required). If you have templates you will use in more than one space, it makes sense to make them global. However, you may wish to determine policy on that (do you mind having a larger number of global templates, what proportion of the number of spaces will likely use them, etc.). They can always be copied from one space to another manually (edit, highlight, copy, cancel, switch to other space admin, create, paste and save).

For the third item, you might be expecting the rich-text editor but that is not implemented for templates. You have to use markup. So, you can put in {section} and other "full-page" macros. You have it all there. See <http://confluence.atlassian.com/renderer/notationhelp.action?section=all>


Tags: layout

template