How to redirect/bypass site pages using Concrete5

Permalink 1 user found helpful
A client wanted to bypass certain pages within their site structure and go direct to content

They wanted to be able to click on a level 1 item of the menu and redirect to a sub-page in level 3.

We created a replica of the page structure using Add External URL's feature in the dashboard=>sitemap and linked it back to the sub-page URL in the page structure. Hide from Autonav was turned on for the pages in the structure so that only the External URL's showed in the menu along with the other level 1 pages.

1 Attachment

Enlive
 
Mnkras replied on at Permalink Reply
Mnkras
not the best way, there is now a better way!

go to the sitemap choose move drag it onto home and click alias, tada!
Enlive replied on at Permalink Best Answer Reply
Enlive
I tried your suggestion, but never worked for me. All it did was create a replica link of the page in a different location.

What my client wanted was to click Portfolio and be redirected to

portfolio/graphic-design/page_whatever

They didn't want a page for Portfolio or Graphic Design.

If you know of a better way to do this with alias or any other please let me know as this was the best I could come up with.
Techn0tic replied on at Permalink Reply
Techn0tic
I built a quick redirection into my site theme's header.

I created a page attribute called "redirectto" - just a text attribute into which I could enter a redirect path e.g. "/mysection/targetsubpage"

then in the theme header (before the HTML doctype) I added:

<?php
$redirect = $c->getCollectionAttributeValue('redirectto');
if($redirect!=''){
  /* Redirect browser */
  header('HTTP/1.1 301 Moved Permanently');
  header ("Location: ".BASE_URL.DIR_REL.$redirect);
  exit;
}
?>


This does rely on url rewriting to be turned on but it would only require the "index.php" part of the URL to be added if you're not using pretty urls.