Tags:
create new tag
view all tags

SID-00149: Edit tmplate addition breaks topic parent changing

Status: Answered Answered TWiki version: 4.2.4 Perl version: indigoperl 5.86
Category: CategoryTemplates Server OS: Windows 2003 Last update: 17 years ago

Hello,

Since we are now using the TinyMCE editor, I made a way for users to create links to Wiki pages without having to type the page name (our users were used to the Kupu editor, which has this feature built in).

I wrote a little javascript, and an html form to accomplish this. I looked at the edit template, and saw that the place the access keys are, would be the perfect place to put the Wikilink feature, since none of our users use the access keys.

So, I made a new edit template, edit.test.tmpl (attached).

The new feature works fine. However, one side effect I have noticed is that I cannot change any of the topic parents when using this new template.

I tried changing the names of the html form fields, thinking they were conflicting with others on the page, but no luck.

Does anyone have any advice?

Thanks! Kathy

-- KathyDeLaCruz - 02 Mar 2009

Discussion and Answer

OK, I figured out my problem -- it was the fact that my new form was being placed inside another existing form, and breaking it.

I ended up making it work by making it like the Access Keys Help pop up window; I made a separate topic containing the link building form & script, and included that in my edit.pattern.tmpl at the top, instead of the Edit Help twisty, that our users really don't use.

In case someone else is interested, here's what I did in edit.pattern.tmpl:

I added the template definition line:

%TMPL:DEF{"crystal_link"}%%ICON{info}% <a class="twikiPopUp" target="CrystalLinkBuilder" href="%SCRIPTURL{"view"}%/%BASEWEB%/CrystalLinkBuilder">%MAKETEXT{"Build a link to a Wiki page"}%</a>%TMPL:END%

Then I modified the line:

%TMPL:DEF{"toolbar"}%<div class="patternTop">%TWISTYBUTTON{id="edithelp" mode="div" remember="on" link="%MAKETEXT{"Edit help"}%" showimgleft="%ICONURLPATH{toggleopen}%"
hideimgleft="%ICONURLPATH{toggleclose}%"}%</div><!--//patternTop-->%TMPL:END%

to be instead:

%TMPL:DEF{"toolbar"}%<div class="patternTop">%TMPL:P{"crystal_link"}%</div><!--//patternTop-->%TMPL:END%

-- KathyDeLaCruz - 04 Mar 2009

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Edit tmplate addition breaks topic parent changing
SupportCategory CategoryTemplates
TWiki version 4.2.4
Server OS Windows 2003
Web server Apache 2
Perl version indigoperl 5.86
Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt edit.test.tmpl.txt r1 manage 1.7 K 2009-03-02 - 23:31 UnknownUser  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2009-03-04 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.