Page Redirect Asset = needed

I would like to strongly ask/suggest that Percussion create a Page Redirect Asset that users can link to instead of setting server-side redirects.

For example: Multiple pages on our sites link to the Undergraduate and Graduate course catalogs. We host these externally on Issu.com because their presentation is much better than the PDF simply opening in the browser window. On our old site we created simple PHP pages with code redirecting to the Issu.com URL. When the Issu URL updated, we changed the URL once.

The key part of this is that the redirect exists as an asset in Percussion — because if it doesn’t, I can’t use the link function in the Rich Text Editor to link to it, which means whenever the document updates I’ll have to go to several different (easily-to-forget) pages and update the navigation assets that link to it.

+1

Good point.

Hi Brian,

This is actually a feature that was implemented for our Percussion CM1 SaaS service. We agree that it would be nice to have this feature available on-prem as well, but at this time it is currently not supported.

Regards,
Chris W

It seems like something that’d be pretty straightforward to put together—maybe as a widget on a page?

Would it work if I created an empty template for redirect pages, and put PHP or ASP redirect code in their individual header metadata?

Hi Brian,

I apologize for the delayed response. Having a redirect asset would be a great idea. Here is an alternative that you can try:

  1. Go the the Widget Builder menu in CM1
  2. Create a new widget called ‘redirect’ and fill in the appropriate information under the ‘General’ tab.
  3. Under the ‘Content’ tab add a field with name:redirectURL and label:‘Target URL’ of type text.
  4. Move to the ‘Display’ tab and add this code (this is an ASP example):

#set( $q = ‘"’ )
#set($!perc.page.additionalHeadContent = “$!{perc.page.additionalHeadContent}” + “”)

  1. Deploy the widget
  2. Move to the ‘Assets’ directory in CM1 and click button to create a new asset and select your new redirect asset.
  3. Either on a page with available regions or a template, move to the ‘Layout’ tab and click add widget. Add the widget you just created.
  4. Move to the ‘content’ tab and drag your asset from the ‘Assets’ directory to your new widget/region.

This page needs to have a .asp extension, but this will perform your redirect right away. Your web server needs to be configured to serve classic asp pages in order for this option to work.

Or for a more universal alternative, use the meta tag, which all browsers support and doesn’t require any server side code. You could use this in the Display tab of the widget builder instead of the above suggestion:

#set($!perc.page.additionalHeadContent = “$!{perc.page.additionalHeadContent}” + “”)

this will not require an asp extension.

Also, I should have pointed you to a link about our redirect service in SaaS, you can find that here:

http://help.percussion.com/publishing…

Let me know if this helps, or if you have more questions.

Regards,
Chris W

Hi Brian,

It looks like Get Satisfaction got the best of me on April Fools’ and formatted my code…

Here are the two pieces of code that should be in the ‘Display’ tab respectively:

#set($!perc.page.additionalHeadContent = "$!{perc.page.additionalHeadContent}" + " Response.Redirect ${q}$redirectURL${q} %\>") ```   
 
and   
 
``` #set($!perc.page.additionalHeadContent = "$!{perc.page.additionalHeadContent}" + "<meta http-equiv="Refresh" content="0; URL=$redirectURL">") ```   
 
Let me know if you have more questions.   
 
Thanks,   
Chris W

Thanks Chris! I’ll give this a try. We’ll probably go server-side for the bulk of our redirects, at least initially, but there are bound to be more in the future, and this should be perfect for those. I appreciate your help!

—Brian

@Chris, I’ve experimented with the “universal alternative” as a widget and experienced problems trying to edit any page I’ve deployed it on. Editing any page with that widget deployed to it causes the CM1 editor itself to attempt to redirect to the given page, which results in the CM1 editor displaying my site’s 404 page.

It was my hope to use this for a non-page menu item, since I can’t find a way for CM1 to create a non-page menu item that contains sub-pages:

David, I had the problem with Percussion redirecting when I tried to work on a page—but I had the problem when I first experimented with this whole idea by creating a blank page and putting the header redirect information in the Page Metadata area. I created the widget as listed above and it solved that problem.

@Brian, I checked and I didn’t add a redirect meta tag. After trying a 2nd time to re-create the redirect widget above and having similar issues attempting to edit the page it’s deployed on, I might end up having to use the redirect meta tag.

Hi David,

I apologize for the delay.  Here is what you could add to remedy this issue.  For your ‘Display’ tab in the Widget Builder:

#if (!$perc.isEditMode())#set($!perc.page.additionalHeadContent = "$!{perc.page.additionalHeadContent}" + "")#end

Let me know if this helps.

Regards,
Chris W