Hi all,
I need to be able to add a template to some existing pages in way that it is editable in editor in whole (no include).
I tried by adding a user macro to page which uses AJS.toInit(), resulting in the code to be seen as text on page only.
First, a there any options to be enabled (html macro is enabled!?) besides the user macro rendering options, resources to be defined? As total novice to Confluence 4.1.3 I would appreciate some advice.
I'm not sure exactly what you're looking for. Have you checked out the Page Layout and Global Layout templates in the Space Admin? This would be where I would add content that I want to appear on existing pages. It won't let you edit that shared content plus your body text at teh same time, but that should be the case anyway.
Thanks for reply - here is what I'm looking for:)
Some pages need to be get a header that user has to enrich, resp. a template. In order to do so I thought about a user macro which lets user easy add the template. Concatenated content should be seen in editor so user can fill out the integrated header.
I tried code from Use jquery load() function but macro source is "rendered" as text to page, so I guess st. is missing, needs to be activated?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might want to consider just adding standard text to your existing pages. Of course, once added it becomes part of the page and is no longer "a template", but often we just use the term template to reference standard text blocks. Here is an example that shows how to automate this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't understand your question then, so, you want a user while editing a page to be able to draw in a chunk of standard text, make changes and have it part of the page.
We would use a different approach for situations similar to this by using: https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.scaffolding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome and thx for the answer - but our budget has reached its limit.
So I went back to the user macro which puts "tinyMCE is not defined" error to
console - which means that the appropiate .js is not properly included??
## @noparams <script type="text/javascript"> AJS.$(document).ready(function(){ alert( "Is tinymce active editor: "+tinyMCE.activeEditor ); } ); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think what you want are user templates. You define them and then when you create a page, you can set the template on the page. The contents of the templates are copied into the page when it is created so the user can edit it just as they would other user content.
Here's more info on user templates:
https://confluence.atlassian.com/display/DOC/Working+with+Templates
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, we are getting closer:)
I redescribe: "Is it possible to add a template to existing pages without recreating the pages?"
This was asked 2010 and the answer was "no, not yet" (see question).
But what I understand from jquery load() function is that it gets the content from page b, resp. a template, concatenates it with content from current page a and loads it to tinymce editor, which is pretty much what I want - I guess.
The problem is: As result I just see the code of the macro as new page content. How do I getting scripting to work? St. is missing, needs to be activated? A resource needs to e defined?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.