Prefilled new wiki page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2013 07:28 PM
Hi
Let me say that I’m not a developer, so please be gentile with me
I have a Wiki were we store technical information. All the wiki pages have the same structure.
Is there any way that when a new wiki page is created, instead of a blank page, I get a page prefilled with some html?
Thanks
Let me say that I’m not a developer, so please be gentile with me
I have a Wiki were we store technical information. All the wiki pages have the same structure.
Is there any way that when a new wiki page is created, instead of a blank page, I get a page prefilled with some html?
Thanks
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2013 04:17 AM
I have never used the Wiki pages, but you will be able to do what you want but it will require some configuration work either changing the default Wiki form for adding content or creating a rule which would add your content to the page when created.
I hope someone with Wiki experience will read your post and respond in some detail as to what to modify.
I hope someone with Wiki experience will read your post and respond in some detail as to what to modify.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2013 02:29 PM
Since you are not a developer,the easist option is to modify ${TOMCAT_HOME}/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/wiki/createform.get.html.ftl
1.Open createform.get.html.ftl with text editor you'll see something like this:
2.Search with keyword "pagecontent" in the file you'll find a line like this
3.Before
then save the file.
4.Open web browser and browse to http://localhost:8080/share/service/index(input admin username and password if needed),go to the end of the page and click "Refresh Web Scripts",then you'll get what you need.
1.Open createform.get.html.ftl with text editor you'll see something like this:
<@markup id="css" > <#– CSS Dependencies –> <@link href="${url.context}/res/modules/document-picker/document-picker.css" group="wiki"/> <@link href="${url.context}/res/components/object-finder/object-finder.css" group="wiki"/> <@link href="${url.context}/res/modules/simple-editor.css" group="wiki"/> <@link href="${url.context}/res/modules/taglibrary/taglibrary.css" group="wiki"/></@><@markup id="js"> <#– JavaScript Dependencies –> <@script src="${url.context}/res/modules/document-picker/document-picker.js" group="wiki"/> <@script src="${url.context}/res/components/object-finder/object-finder.js" group="wiki"/> <@script src="${url.context}/res/modules/simple-editor.js" group="wiki"/> <@script src="${url.context}/res/modules/taglibrary/taglibrary.js" group="wiki"/> <@script src="${url.context}/res/components/wiki/createform.js" group="wiki"/></@><@markup id="widgets"> <@createWidgets group="wiki"/></@><@markup id="html"> <@uniqueIdDiv> <div class="page-form-header"> <h1>${msg("header.create")}</h1> <hr/> </div> <div class="page-form-body"> <#– The "action" attribute is set dynamically upon form submission –> <form id="${args.htmlid}-form" action="" method="post"> <fieldset> <input type="hidden" id="${args.htmlid}-page" name="page" value="wiki-page" /> <div class="yui-gd"> <div class="yui-u first"> <label for="${args.htmlid}-title">${msg("label.title")}:</label> </div> <div class="yui-u"> <input type="text" maxlength="100" size="75" id="${args.htmlid}-title" name="pageTitle" class="wide"/> * </div> </div> <div class="yui-gd"> <div class="yui-u first"> <label for="${args.htmlid}-content">${msg("label.text")}:</label> </div> <div class="yui-u"> <textarea class="yuieditor" name="pagecontent" id="${args.htmlid}-content" cols="180" rows="10">test add default content</textarea> </div> </div> <div class="yui-gd"> <div class="yui-u first"> <label for="${htmlid}-tag-input-field">${msg("label.tags")}:</label> </div> <div class="yui-u"> <#import "/org/alfresco/modules/taglibrary/taglibrary.lib.ftl" as taglibraryLib/> <@taglibraryLib.renderTagLibraryHTML htmlid=args.htmlid /> </div> </div> <div class="yui-gd"> <div class="yui-u first"> </div> <div class="yui-u"> <input type="submit" id="${args.htmlid}-save-button" value="${msg("button.save")}" /> <a href="${url.context}/page/site/${page.url.templateArgs.site}/wiki" id="${args.htmlid}-cancel-button">${msg("button.cancel")}</a> </div> </div> </fieldset> </form> </div> </@></@>
2.Search with keyword "pagecontent" in the file you'll find a line like this
<textarea class="yuieditor" name="pagecontent" id="${args.htmlid}-content" cols="180" rows="10"></textarea>
3.Before
</textarea>
add whaterver you want,for example<textarea class="yuieditor" name="pagecontent" id="${args.htmlid}-content" cols="180" rows="10">test prefilled content</textarea>
then save the file.
4.Open web browser and browse to http://localhost:8080/share/service/index(input admin username and password if needed),go to the end of the page and click "Refresh Web Scripts",then you'll get what you need.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2013 07:24 AM
Yes, very helpful. This was exactly what I needed. Works great.
Thanks a lot.
Thanks a lot.