Tags:
create new tag
view all tags

Feature Proposal: link to "view" instead of "edit"

Motivation

Enabling the (personally modified) webtopic-creation-template ( WebTopicCreator ) to create a new topic by using the "?"-Link, which is applied automatically to non-existing-WikiWords like: FooBarBaz?

Description and Documentation

according to ModifyingAutomaticLinkingOfWikiWords I would prefer to use the standard-way to create a new Topic. By modifying the rendering of non existing wikiwords from "edit" to "view", the automated usage of WebTopicCreator will be enabled

Only a minor change of /lib/TWiki/Render.pm in sub _renderNonExistingWikiWord is necessary:

Index: Render.pm
===================================================================
--- Render.pm (revision 317)
+++ Render.pm (working copy)
@@ -569,7 +569,7 @@
             push( @posse,
                   CGI::a(
                       { href => $this->{session}->getScriptUrl(
-                          0, 'edit', $theWeb, $t,
+                          0, 'view', $theWeb, $t,
                           topicparent => $this->{session}->{webName}.'.'.
                             $this->{session}->{topicName} ),
                         rel => 'nofollow',
@@ -581,7 +581,7 @@
         $ans .= join( ' ', @posse );
     } else {
         $ans .= CGI::a( { href=>$this->{session}->getScriptUrl(
-            0, 'edit', $theWeb, $theTopic,
+            0, 'view', $theWeb, $theTopic,
             topicparent => $this->{session}->{webName}.'.'.
               $this->{session}->{topicName} ),
                           rel=>'nofollow',

Examples

Impact and Available Solutions

Implementation

-- Contributors: ChristianSuenkel

Discussion

-- ChristianSuenkel - 27 Feb 2007

I vote for this change.

-- ArthurClemens - 27 Feb 2007

thinking over.... there could be a problem with the extra paramters like ?topicparent=XXX.FooBar. The WebTopicCreator has to care about and has to hand over it to the edit-script?!

-- ChristianSuenkel - 27 Feb 2007

Could it be made configurable, perhaps by user or by web? I can imagine some of my users wanting to use the topic creator, and some of them wanting to just create the topic.

-- RafaelAlvarez - 27 Feb 2007

It is already configurable for the site.

In TWikiPreferences we have the variable

         * Set NEWLINKFORMAT = <span class="twikiNewLink">$text<a href="%SCRIPTURLPATH{"edit"}%/$web/$topic?topicparent=%WEB%.%TOPIC%" rel="nofollow" title="%MAKETEXT{"Create this topic"}%">?</a></span>

Just change edit to view.

And I would HATE to have the extra step through the WebTopicCreator. I like the speed (wiki-wiki) you can create topics with - creating the ?-mark and boom you are editing the new topic. It is only when I want to select a different template that the creator is interesting and then I'd rather have a link in my TWiki app to create new topics.

So basically - those of you that want this can just edit in TWikiPreferences and us that don't can just leave things as they are.

The setting only works in TWikiPreferences so you cannot set it per web. Maybe that should be fixed. If you add the setting to WebPreferences then the $web and $topic is not expanded.

-- KennethLavrsen - 27 Feb 2007

The key value of a wikis is its simplicity. An extra step in creating a page can be useful in certain cases, but in general, I believe that clicking on a questionmark link should lead directly to edit. As Kenneth said, this can be set in the site configuration for those who prefer an intermediate page.

-- PeterThoeny - 27 Feb 2007

Ah, I forgot the configuration option.

-- ArthurClemens - 27 Feb 2007

Agree with Kenneth and Peter, this should be configurable option as now, perhaps with some docs explaining this use case.

-- RichardDonkin - 04 Mar 2007

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2007-03-04 - RichardDonkin
 
  • 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.