Justin Ruffell-Ward - Insight Support
posted this on December 10, 2010 17:02
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:
Comments
I followed these easy to follow instructions - but the redirect did not work. Please check the script I used and tell me what I dod wrong.
<script type="text/javascript">
if (window.location.href.indexOf('/aspnet_client/') < 0){window.location = "/Contact_Us/Contact_Us.aspx"; }
</script>
Try checking the source code to see if it contains a line break between /Contact_Us/ and //Contact_Us.aspx'. The document editor doesn't understand source code and occasionally inserts breaks in inappropriate places.
Chris, is the article containing the script definitely being called? Perhaps it's in layout that loads the group homepage article but it has not been set to be the group homepage.
If this isn't the reason let us know your website url and I'll take a look.
I got this working now. I had an error in the syntax. Thank you!
This feature works pretty well and it's easy to set up but when you click on the menu option/group that is getting redirected to another page on the site, the whole screen jerks to the right and left as the new page is loading. Is there a way to make the transition seamless?
The way I got over this was to place the redirection article in a sub-group and give that subgroup its own stylesheet and layout, based on the blank layout from the theme park. The layout I used contained nothing except the redirection article, which I placed in the header bar, and the footer bar. No graphics, etc., just a simple, centered, redirection message in a 100% width div. That fixed it for me.
You may also be interested to know that it is possible to go a step further with this trick, by creating two redirection articles, diverting the user to different parts of the site depending on their access permissions. You then embed these articles within a third article, and make that article the target of the initial link.
I'm not following you; please explain further. I have 15 groups that are my primary groups and each has an Article. I also have 30 phantom groups (2x15) that are nothing more than pages that should redirect to to the 15 primary group articles. When someone clicks on the phantom group, there will be a redirect to the primary. During this redirect, the whole website momentarily shifts to the far right of the screen and then back again before painting the redirected page. I am trying to find a way to eliminate the visible redirect jerky page action.
From my experience, the judder you are describing seems to occur because the system begins to render the page containing the redirect, then encounters the redirect instruction and begins to execute that, leaving the partially-rendered (and often incorrectly aligned) image on the screen while it does so. By setting the theme (aka style sheet) and layout of the group containing the redirect (your phantom groups) to a simple 'vanilla' colour scheme and minimalist layout, as described in my first response, the browser has nothing much to display whilst the redirect is executing; so the effect is generally that of a slightly extended pause before the new screen is rendered. If you still get a sideways judder, try tweaking the 'Page Layout'/'Alignment'/'Left Padding' and 'Right Padding' settings in the theme of the group containing the redirection: but be careful not to accidentally change your main theme and layouts.
The more complex arrangement I described in my second response is one I am using for situations where a single link from an article has to be redirected, depending on the user's access rights, to locations that utilise completely different themes and layouts. In that situation, the last thing I want is for the user to get a momentary glimpse of the alternate colour scheme and layout before the redirected page appears.
In my attempt to limit access to the address book to only certain people, I created a seperate Address book group, and then added the above mentioned redirect script within the article of that page, allowing people who are a part of that group access to the address book. Sounds great, however when I went to disable the address book so that it would not show up under the HOME menu, it then disabled the redirect page I had created. Is there a way to have a redirect as I have created, but also remove the Address book from the home dropdown menu without completely disabling it...
Hi, Neal!
The problem here is that the address book really needs a mechanism for disabling it in certain groups or layouts, instead of being a default on or off. Otherwise, even if you used clever programming to hide it, a clever hacker could probably get at it. But have you considered the alternative strategy of creating members-only areas as independent groups and leaving the rest of the site open to any visitor?
Note also that you can prevent people from accessing the address book by setting your Address Book policy to exclude non-members. However, if you want to discuss this further, I think you'd better start another topic.