ChurchInsight  is now  
Hubb.church
 
 
 
 

Support for Hubb users

How can we help you today?

Support > Site Structure (groups) > How can I forward a menu option to another location?

How can I forward a menu option/group to another location?

There are two methods you can use, the first is the newest/easiest, the second is the old code-based method which has been left here for completeness as it offers a little more control if needed.

Method 1

You can forward a user to another group using the redirect controls in the Advanced Options of the group.
 

  • If the group doesn't exist, create it in the required position in the site tree.

  • Go to the Group Settings cog group-settings-cog-icon and choose the Properties section.

  • Using the 'This group redirects to:' setting, choose where in the site, – an article, a group homepage, a system page, or an external URL – you want to direct to in the same way as you would to set a normal link in the system.

  • Don't forget to Save the Advanced Options.


After making the change, reload your home page (you may need to do this a few times to force the change to load) and test the new link.

group-redirectNB. If your new link is not in the correct location in the site tree, see this page under "Moving a group".

Method 2

You can forward a group (option on the menu) to a different area of the site by adding a simple script to an article.

For example you may want to have an area e.g. Students located in 2 different areas of your site structure but wish to direct them to one area for information about that topic so you don't have to duplicate the material. Another example where this might be used is when you which to move the location of one of the system pages, e.g. if you wish to move the monthly calendar from below the 'Home' menu to a more prominent place within your site's navigation structure.

Both these examples would be achieved in the following way:
  • Copy the url location of the page you wish to direct the user to e.g. if you were wishing to add an option for the monthly calendar you would go to the monthly calendar and copy the url from the address bar of your browser i.e. /Calendar/Month.aspx .
    Note: if you are forwarding to a page on your web site you don't need to include your domain name, you only need the part of the address after your domain name. This is called a relative link and means if would work even if you changed your site domain name.
  • Create a group that you want to setup the forward within. e.g. if wishing to move the location of the monthly calendar you would create a new group for the monthly calendar in the position you require within your site structure.
  • Create an article within the newly created group and add the script to an article. First create a new article within your newly created group. When the document editor loads select the 'Source' option from the editor's toolbar (it's the last option on the far-right of the toolbar options). Replace the text that appears in the 'source' with the following code:

    Forward Scripts
    There are two options for linking to a web page from your menu bar.
    1. You can make the user go straight to the link from your site in the same window.
    2. You can choose to open the link in a new window so a user remains on your site in the original browser window.

    Replacing your page with the page you are linking to
    Paste in the script below replacing the URL (in red) with the URL you wish to forward to.
     
    <script type="text/javascript">
    window.location = "/Group/Group.aspx?ID=18617";
    </script>

    Opening the link in a new window
    To add a script that will open the link in a new window please use the code below replacing the URL in red with the address you wish to forward your user to.
     
    <script type="text/javascript">
      window.open('https://www.bible.com/bible/111/jhn.1.niv');
    </script>

    Note: A user's browser settings may block a link opened in a new window if they have pop-up blocker enabled in their browser so you may want to include text on the page, if this occurs, to inform the user that the browser has blocked the link, and possibly include a link to the external site that the user can click on as an option if they do not want to override the popup blocker.
     
  • Publish your article, giving it a name.
  • Make your article a group homepage article by clicking on the house icon in the documents tab to the right of the document title. Your newly created group should now forward you to your new location.
    Note: The forward will only work if you have a layout with an Article component set to display the group homepage
  • Your forward should now be complete – test it and see.