Can a page within a space link to an external URL? The workaround is that I add some text within the page. That text then links to the external URL. Thanks!
You can create a user macro to do this. @Stephen Deutsch has created a user macro for this. Here is his code. I wouldn't make the timeout 0 though ... it makes it hard to edit the page if you need to. : )
https://bitbucket.org/stephendeutsch/confluence-user-macros/src/
Macro Name:
redirect_macro
Macro Title:
Redirect Macro
Macro Body Processing:
No macro body
Template:
## Macro title: Redirect Macro
## Body processing: N
##
## Developed by: Stephen Deutsch
##
## This macro redirects the user from the current page to a new page defined in the options.
## This macro more or less duplicates the functionality of the ServiceRocket Redirection Plugin
## Copyright 2014 zanox AG
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## @param location:title=Location|type=string|required=true|desc=The URL to redirect to
## @param delay:title=Delay|type=string|default=0|desc=The number of seconds to delay before redirecting the browser.
#set ( $Integer = 0 )
#set ( $delay = "0" )
#set ( $delay = $paramdelay )
#set ( $delay = $Integer.parseInt($delay) * 1000 )
#if ( $req.getParameter('redirect') != "false" )
<script>
setTimeout(function() {
window.location = "$paramlocation";
}, $delay);
</script>
#end
<ac:macro ac:name="note">
<ac:parameter ac:name="title">Redirection notice</ac:parameter>
<ac:rich-text-body>
<p>This page will redirect to <a href="$paramlocation">$paramlocation</a> in about $delay seconds.</p>
</ac:rich-text-body>
</ac:macro>
Hi,
you can’t do this by default, however our approach to this issue is adding a redirect macro to the page which does the job. However this is a custom macro which is not available on the marketplace :(
Bedt, Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.