cologneknight
Hello DokuWiki friends,
I already posted my problem in the German forum, but didn’t get an answer. I hope that you can help me with my problem because it is very urgent.
My problem is that I want to implement a template for articles in DokuWiki. All articles that are created should look the same. In the first version of my template-generator I integrated a button in the toolbar and the template was automatically integrated into the textarea “wiki__text”. The disadvantage is that a lot of HTML-Code is integrated into the textarea and the user has to change certain variables into his specific user data in the HTML-Code. The problem is that many users don’t have any idea about HTML so they don’t know how to use the template. To solve this problem I want to integrate a form. The users fill the textboxes with their data and send this form. The content of the textboxes will be replaced with the variables in the article-template. After that the HTML-Code with the replaced user data will be integrated automatically in the textarea. In fact the code is integrated into the textarea but the user doesn’t have to change anything in the code. At the end of that template there is normal DokuWiki code for creating (sub-) headers and normal text. So it’s quite easy to understand and change that part of template.
Actually the article-template is created and ready to use. I also created the form. It sends the user data to its own data file. After that the variables are replaced with the specific user data. So, I actually have a template for the articles with the ready-made code that should be integrated in the textarea like it now is.
My problem is that I have no idea how to integrate that template into the textarea. I know that I have to use JavaScript for filling the textarea but I don’t now very much about JavaScript.
I hope you understand my problem and my English. I would be very glad if you could help me.
Thank you very much.
Yours faithfully,
CologneKnight
andi
Sounds like a job for the bureaucracy plugin to me.
cologneknight
Hello andi,
I've installed this plugin and tried to test ist. But there is one small problem.
In the commandline "action" I have to name three details:
- template
- path to template
- path of site that should be created
is that correct?
I read the documentation of that plugin but when I try to send the form, I get that error:
"Seitenname nicht angegeben" --> "pagename not named"
I think I did everything like it is explained in the documentation
<form>
action template vorl_template testpage
fieldset "Creating a new Docmentation"
textbox "TITLE" @
textbox "SUBTITLE" @
select "type of documentation" "Value 1|Value2|Valu3" @
date "DATE" @
textbox "AUTHOR" @
textbox "RESPONSIBILITY" @
submit
</form>
vorl_template is the existing template that lies in the same namespace like the form
testpage is the page that should be created with the template (does not exist)
adrianlang
Your example form works fine for me.
cologneknight
hmmm...
the exact english error is "Missing pagename." . When does this error exactly occures?
Perhaps missing argument in commandline "Action"?
Or named the wrong template pagename?
Both couldn't be true, because I'm sure that this example is correct.
Of course there must be a reason why this error occures. But if this example is correct, why do i get this error?