How do I re-edit a page created with a template

Tom Crapper August 30, 2011

Hi

I have created templates with individual variables for each field. When a template is used to create a page, it saves fine. However, if I want to change it after saving, any variable fields that were not filled in at the page's creation are not there for me to populate subsequently.

Example:

I have a whole load of widgets that I want to record. I create a template with 6 fields, "Make" "Model" "Serial" "Colour" "Length" "Height" (using the markup @<VARIABLE>@). I access the template and fill in the details for any given widget, but don't fill in all the fields to start with - this all works great. When I go back later and edit the page to add the variables, there is no space for me to add data to the fields.

Help??

6 answers

1 accepted

1 vote
Answer accepted
Kevin Buchs
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2011

Ok, I see something I don't understand, but this must be something like a CSS form or HTML. A Confluence template will not be as feature rich but might look something like this basic example below. Scaffolding gives you a nice interface to the page, as suggested above.

----

h4. Event Name:

enter name

h4. Event Type:

enter type: one of: Board_meeting, Meeting, Conference, Forum, ...

h4. Event Venue:

enter venue

...

h4. Event Country:

enter country

h4. Notes:

enter notes here

----

Tom Crapper September 25, 2011

Kevin,

Thanks for your input. I could not get it to work at all, but in the end the problem seems to have been the Scaffold plugin. I uninstalled and then put it back and it now works fine.


Thanks!

Like Md Liton likes this
0 votes
Tom Crapper August 30, 2011

Kevin,

Here is an example of one of the templates that I have created so far:

 ||Event
 Name:  |@eventname@|  ||Event Type:  
|@eventtype|list(Board_meeting,Meeting,Conference,Forum,Reception,Ceremony,Seminar,Exhibition,Trade_Show,Regional_Activity,Banquet,Dinner,Team_Building,Screening,Reading,Gathering,Lecture,Performance,Festival,Party,Sporting_Event)@| 
 ||Event Venue:  |@eventvenue@|

||Event Building: |@eventbuildingname@
||Event Street: |@eventstreet@
||Event District: |@eventarea@
||Event City: |@eventcity@
||Event County: |@eventcounty@
||Event Post Code: |@eventpostcode@
||Event Country: |@personworkcountry|list(Unknown,UK,Guinea,Mozambique,USA,______________________,Afghanistan,Africa,Albania,Algeria,American_Samoa,Andorra,Angola,Anguilla,Antarctica,Antigua_And_Barbuda,Antilles_Netherlands,Arabia_Saudi,Argentina,Armenia,Aruba,Asia,Australia,Austria,Azerbaijan,Bahamas,Bahrain,Bangladesh,Barbados,Belarus,Belgium,Belize,Benin,Bermuda,Bhutan,Bolivia,Boznia_and_Herzegovina,Botswana,Bouvet_Island,Brazil,British_Indian_Ocean_Ter,British_Virgin_Islands,Brunei_Darussalam,Bulgaria,Burkina_Faso,Burundi,Cambodia,Cameroon,Canada,Cape_Verde,Caribbean_the,Cayman_Islands,Central_African_Republic,Central_America,Chad,Chile,China,Christmas_Island,Cocos_Keeling_Islands,Colombia,Comoros,Congo,Congo_Dem_Rep_of,Cook_Islands,Costa_Rica,Cote_DIvoire,Croatia,Cuba,Cyprus,Czech_Republic,Kazakhstan,Kenya,Kiribati,Korea_Dem_Peoples_Rep,Korea_South_Republic_of,Kosovo,Kuwait,Kyrgyzstan,Lao_Peoples_Democ_Rep,Latvia,Lebanon,Lesotho,Liberia,Libyan_Arab_Jamahiriya,Liechtenstein,Lithuania,Luxembourg,Macao_China,Macedonia_TFYR,Madagascar,Malawi,Malaysia,Maldives,Mali,Malta,Man_Isle_of,Marshall_Islands,Martinique_FR,Mauritania,Mauritius,Mayotte_FR,Mexico,Micronesia_Fed_States_of,Middle_East,Moldova_Republic_of,Monaco,Mongolia,Montenegro,Montserrat,Morocco,Mozambique,Myanmar_ex_Burma,Namibia,Nauru,Nepal,Netherlands,Netherlands_Antilles,New_Caledonia,New_Zealand,Nicaragua,Niger,Nigeria,Niue,Norfolk_Island,North_America,Northern_Mariana_Islands,Norway,Oceania,Oman,Pakistan,Palau,Palestinian_Territory,Panama,Papua_New_Guinea,Paraguay,Peru,Philippines,Pitcairn_Island,Poland,Portugal,Puerto_Rico,Qatar,Reunion_FR,Romania,Russia_Russian_Fed,Rwanda,Sahara_Western,Saint_Barthelemy_FR,Saint_Helena_UK,Saint_Kitts_and_Nevis,Saint_Lucia,Saint_Martin_FR,S_Pierre_and_Miquelon,S_Vincent_And_Grenadines,Samoa,San_Marino,Sao_Tome_and_Principe,Saudi_Arabia,Senegal,Serbia,Seychelles,Sierra_Leone,Singapore,Slovakia,Slovenia,Solomon_Islands,Somalia,South_Africa,South_America,SGeorge_And_SSandwich,Spain,Sri_Lanka_ex_Ceilan,Sudan,Suriname,Svalbard_And_Jan_Mayen_Is,Swaziland,Sweden,Switzerland,Syrian_Arab_Republic,Taiwan,Tajikistan,Tanzania_United_Rep_of,Thailand,Timor_Leste_East_Timor,Togo,Tokelau,Tonga,Trinidad_and_Tobago,Tunisia,Turkey,Turkmenistan,Turks_and_Caicos_Is,Tuvalu,Uganda,Ukraine,United_Arab_Emirates,United_Kingdom,United_States,US_Minor_Outlying_Isl,Uruguay,Uzbekistan,Vanuatu,Vatican_Holy_See,Venezuela,Viet_Nam,Virgin_Islands_British,Virgin_Islands_US,Wallis_and_Futuna,Western_Sahara,Yemen,Zambia,Zimbabwe,Not_Specified)@

||Event Contact: |@eventcontact@

||Notes: @notes|textarea(10,120)@


I have also created a homepage for 'Events' which has an {add-page} macro:

{add-page:template=Events|live=false|title=This will take you to a page where you should enter the event name.|labels=events}
[Click here to add an event to the database]
{add-page}
(I even worked out how to add a 'cloaked' list of all the child pages - all of which makes me feel only slightly smug; the main issue still exists!!)

Thanks in advance!

0 votes
Kevin Buchs
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2011

I would suggest creating a template (as in Confluence template), either space or global, and then use the {add-page} macro to create a hyperlink on a given page to add a new data page. You can have it put a date/time stamp and fixed or editable name. And it can use the template you created.

However, perhaps you already created a page template in confluence. Can you share that with us? We may be able to help you tune it.

Tom Crapper August 30, 2011
Kevin,
Here is an example of one of the templates that I have created so far:

0 votes
David Peterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2011

The Scaffolding Plugin is designed to deal with this issue, and will let you edit the page with text/dropdown/checkbox fields. It is quite flexible. See here for more info:

http://wiki.customware.net/repository/display/AtlassianPlugins/Scaffolding+Plugin

Regards,

David Peterson

Tom Crapper August 30, 2011

David,

I'm working on the scaffolding plugin right now.

Thanks

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2011

You could try the scaffolding or zones plugins (google them) but I don't think either are uptodate with respect to confluence.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2011

Um, templates are templates, not entry forms. All they do is provide some starting text, and the variables try to help save having to edit that text in detail. A template can run you through the initial creation of a page, but once you've got it, the template is irrelevant and not called or referenced again. You could take a page created by a template, type it in manually, and you wouldn't be able to tell the difference.

Tom Crapper August 30, 2011

Nick, thanks for that; understood.

What I am actuall trying to do is to create a data-entry form that will feed variables into an external SQL db. Once the data is input to the template it will populate the db, and then the data can be re-read and accessed from a different page in confluence.

It's the data-entry piece that I am trying to sort out (and understand), in that I need to capture information against a series of variables which will then populate an external table.

I'm thinking that a template is the best way of doing this, with the page name being the key for the data set/record.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2011

As I said before, Templates are not forms, they simply allow you to pre-populate a page when you are creating it. If you need to edit your data as tough it's a for, then you'll need to find or write something that will intercept any edits (bearing in mind these will be simple page edits of wiki markup or dhtml) and parse those back into the database.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events