View Issue Details

IDProjectCategoryView StatusLast Update
1204Composr documentationGeneral / Uncategorisedpublic2015-09-27 01:08
ReporterChris Graham Assigned ToChris Graham  
PrioritynormalSeverityfeature 
Status resolvedResolutionfixed 
Summary1204: Transparent redirects
DescriptionUsing transparent redirects to put a module in multiple zones.

For example, putting the forum module directly into the welcome zone by setting up these transparent redirects...

:forumview -> forum:forumview
:topicview -> forum:topicview
:topics -> forum:topics

And then setting up non-transparent redirects in the opposite direction to FORCE links to the forum to open up in the welcome zone...

forum:forumview -> :forumview
forum:topicview -> :topicview
forum:topics -> :topics

Talk about how this technique is useful both for 'moving' inbuilt modules without actually moving the files, and how it is useful for having a module operating from multiple zones if you have a large site split into many sections each with their own content (e.g. downloads, galleries, etc).

It ties in with the breadcrumbs tutorial in that you may want particular categories to link back to the zone page, rather than the root of the content type. For example, if you have a download category called 'Staff files' with ID#5, and want this in your staff zone, you'd set up this transparent redirect...

staff:downloads -> site:downloads

And then you'd edit the breadcrumbs XML file so that site:downloads:browse:5 maps straight back to the staff zone front page...

    <substitution match_key="site:downloads:browse:5">
        <link label="Staff">staff:</link>
    </substitution>
TagsNo tags attached.
Attach Tags
Attached Files
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Relationships

child of 1202 ResolvedGuest Fully customising breadcrumbs 

Activities

Guest

2015-05-05 11:14

reporter   ~2750

Transparent Redirects

What are Transparent Redirects ?
Transparent Redirects are a way of redirecting the URL or say a module from its current zone to a different zone and this redirection would be 'transparent' such that the user doesn't know a redirection is in place, and thus sees the page as if it was in the zone they accessed it from.

Where and how to Write Transparent Redirects?
You can access the Redirects page by logging in to the Adminzone, and select 'Structure' , in the drop down you should see the link 'Redirects' which will take you to the Redirects page(as seen in the image)
image: redirect1.png

Here you should see a tabular structure with the following sections(as seen in above image), From Zone From Page -> To Zone To Page and a Trs. Column(checkbox) which stands for Transparent, if Trs is checked the redirect would be a Transparent one.

A normal redirect can be written as follows, say you want to redirect website visitors straight to the “Forums” zone, you could add a redirect on the “Welcome” zone start page, to the “Forums” zone forumview page, you can try this new redirect by scrolling towards the bottom of the page and you should find the “New Redirect” section, this is where we define our new Redirects, lets create our new redirect(refer image)

image:redirect2.png

After entering the details hit “save”.

Now let's test if our new redirect works, go back to your Home page or the Front page and see the results, if you entered all the details correctly as above you should now see that you are directly redirected to “Forums” page instead of “Home” page.
Look closely at the URL of your current home page i.e Forums after redirection, you should see this line in the URL “page=forumview” , this tells you which page was called instead of your home page in this case it was Forum zone's forumview page, this a normal redirect and hence the details are visible as is, the user can look at the URL and tell he was redirected to this particular page.

Now let's try the same for a Transparent redirect and see the results. To make a redirect transparent we need to check the Trs field which indicates that the redirection should be transparent and the user should not know that a redirection has happened in the background,let's go back to our “Redirects” page and check the Trs field to make our redirect Transparent(refer image).
Image:redirect3.png

Once checked, hit “save” again and lets go back to home page to see the results.

When you visit the home page you are redirected to the Forums page just like earlier with the normal redirect, but take a look at the URL now, it doesn't reveal which page was called you won't find the “page” attribute in the URL like in a normal redirect, that's where transparent redirect comes in, the user has no way of knowing that he or she was redirected to this page.

Now that we know how a Transparent redirect works and also how to write one, lets look at some more advanced examples,

Transparent redirects to put a module in multiple zones

You might often want to reference your in built modules or custom modules on your home page or any other page, but in general that could be tedious you will have to make a lot of changes in the module code itself so as to make it display it on the page you desire, however, there's a simple and better way, use a Transparent Redirect.

It ties in with the breadcrumbs tutorial in that you may want particular categories to link back to the zone page, rather than the root of the content type. For example, if you have a download category called 'Staff files' with ID#5, and want this in your staff zone, you'd set up the following transparent redirect,

staff:downloads -> site:downloads

And then you'd edit the breadcrumbs XML file so that site:downloads:browse:5 maps straight back to the staff zone front page...

<substitution match_key="site:downloads:browse:5">
        <link label="Staff">staff:</link>
    </substitution>
redirect1.png (20,894 bytes)   
redirect1.png (20,894 bytes)   
redirect2.png (11,211 bytes)   
redirect2.png (11,211 bytes)   
redirect3.png (6,868 bytes)   
redirect3.png (6,868 bytes)   

Guest

2015-08-19 06:38

reporter   ~3071

Transparent Redirects
----------------------------------

What are Transparent Redirects ?

    Transparent Redirects are a way of redirecting the URL or say a module from its current zone to a different zone and this redirection would be 'transparent' such that the user doesn't know a redirection is in place, and thus sees the page as if it was in the zone they accessed it from.

Where and how to Write Transparent Redirects?

    You can access the Redirects page by logging in to the Adminzone, and select 'Structure' , in the drop down you should see the link 'Redirects' which will take you to the Redirects page(as seen in the image)
image: redirect1.png

Here you should see a tabular structure with the following sections(as seen in above image), From Zone : From Page -> To Zone : To Page and a Trs. Column(checkbox) which stands for Transparent, if Trs is checked the redirect would be a Transparent one.

A normal redirect can be written as follows, say you want to redirect website visitors straight to the “Forums” zone, you could add a redirect on the “Welcome” zone start page, to the “Forums” zone forumview page, you can try this new redirect by scrolling towards the bottom of the page and you should find the “New Redirect” section, this is where we define our new Redirects, lets create our new redirect as "Welcome : start -> Forums : forumview".(refer image)

image:redirect2.png

After entering the details hit “save”.

Now let's test if our new redirect works, go back to your Home page or the Front page and see the results, if you entered all the details correctly as above you should now see that you are directly redirected to “Forums” page instead of “Home” page.
Look closely at the URL of your current home page i.e Forums after redirection, you should see this line in the URL “page=forumview” , this tells you which page was called instead of your home page in this case it was Forum zone's forumview page, this a normal redirect and hence the details are visible as is, the user can look at the URL and tell he was redirected to this particular page.

Now let's try the same for a Transparent redirect and see the results. To make a redirect transparent we need to check the Trs field which indicates that the redirection should be transparent and the user should not know that a redirection has happened in the background,let's go back to our “Redirects” page and check the Trs field to make our redirect Transparent(refer image).
Image:redirect3.png

Once checked, hit “save” again and lets go back to home page to see the results.

When you visit the home page you are redirected to the Forums page just like earlier with the normal redirect, but take a look at the URL now, it doesn't reveal which page was called you won't find the “page” attribute in the URL like in a normal redirect, that's where transparent redirect comes in, the user has no way of knowing that he or she was redirected to this page.

Now that we know how a Transparent redirect works and also how to write one, lets look at some more advanced examples,

Transparent redirects to put a module in multiple zones

You might often want to reference your in built modules or custom modules on your home page or any other page, but in general that could be tedious you will have to make a lot of changes in the module code itself so as to make it display it on the page you desire, however, there's a simple and better way, use a Transparent Redirect.

It ties in with the breadcrumbs tutorial in that you may want particular categories to link back to the zone page, rather than the root of the content type. For example, if you have a download category called 'Staff files' with ID#5, and want this in your staff zone, you'd set up the following transparent redirect,

    staff:downloads -> site:downloads

And then you'd edit the breadcrumbs XML file through "Adminzone >> Structure >> Breadcrumb Overrides" so that site:downloads:browse:5 maps straight back to the staff zone front page...

    <substitution match_key="site:downloads:browse:5">
        <link label="Staff">staff:</link>
    </substitution>

Issue History

Date Modified Username Field Change
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised