Tags:
create new tag
view all tags

Question

Is it possible to use an anchor in a redirect inside a self-developed twiki script?

Example code:

$url = &TWiki::getViewUrl( $webName, $topicName );

$url .= "#PageBottom";
   
TWiki::redirect( $query, $url );   

=> But the redirect will always only open the referenced page but not jump to the correct anchor.

Or ist there a different command in the Twiki API to achieve this?

Environment

TWiki version: unspecified
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version: 5.6.1
Client OS:  
Web Browser: Internet Explorer 6
Categories: Platform

-- TWikiGuest - 13 Mar 2007

Answer

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.

Yes. Use getScriptUrl. But you would be better advised to write a plugin with a REST handler as described in EmptyPlugin.pm, rather than trying write a top level script.

-- CrawfordCurrie - 14 Mar 2007

Thanks a lot!! That was all the information I needed.

-- TWikiGuest - 15 Mar 2007

Change status to:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-03-15 - 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.