Page Template sample which just redirect to the page (5.7.x)

This is a community-contributed tutorial. This tutorial is over a year old and may not apply to your version of Concrete CMS.
Dec 29, 2015

Sometime, "external link" doesn't fulfill your requirement for the page. You may want to display thumbnail image, additional page attribute such as topic and selector attributes to display the categories of the page.

This tutorial explains how to set-up redirect-only page with more page attributes option by creating redirect-only page template and page type in your theme.

(You may also want to customize your Page List and/or Autonav Blocks if you want to avoid additional redirect requests)

Disclaimer

I hold no responsibility over any damages caused by using this script.

Requirement

This uses Page Selector Attribute

https://marketplace.concretecms.com/marketplace/addons/page-selector-attribute1/

How to set-it up

Currently, if you are the site editor who can see the Concrete CMS toolbar on top, you won't get redirected but stayed on the page so that you'll be able to edit.

Basic Set-ups

  • Copy and paste redirect.php below and create a page template under your theme.
  • Create a page type. Add composer elements to enter page name, url and the following page attributes.

external_page Page Selector Attribute

Create a page selector attribute called "external_page"

Or comment out or delete from line 6-10.

external_link Text Attribute

Create a text page attribute called external_link, which you enter URL.

If both externap_page and external_link was entered, externap_page will be used.

Hint: You could add File Attributes

You could add File Attribute to have them download the file.

Code Sample

Code is available on the gist

https://gist.github.com/katzueno/146261d07111ad23fe44

Recent Tutorials
Upgrade Concrete versions 9.3.1 and 9.3.2
Sep 10, 2024
By myq.

How to get past a bug in versions 9.3.1 and 9.3.2 that prevents upgrading the Concrete core through the Dashboard

How to use Composer with Marketplace extensions
Aug 22, 2024

Composer can be used to manage third-party extensions from the marketplace

Controlling Google Tag Manager Tags Based on Concrete CMS Edit Toolbar Visibility
Aug 13, 2024

This document provides a step-by-step guide on how to control the firing of Google Tag Manager (GTM) tags based on the visibility of the Concrete CMS edit toolbar. It explains how to create a custom JavaScript variable in GTM to detect whether the edit toolbar is present on a page and how to set up a trigger that ensures GTM tags only fire when the toolbar is not visible. This setup is particularly useful for developers and marketers who want to ensure that tracking and analytics tags are not activated during content editing sessions, thereby preserving the accuracy of data collected.

Upgrading Concrete from 8.5 to 9.x
Jun 21, 2024
By myq.

How to avoid problems upgrading from 8.5 to 9.x

How to change the default date format
May 30, 2024
By myq.

Change the format of the default date

WebOps Tutorial on Running and Upgrading a Concrete CMS Website
May 2, 2024
By myq.

Describes how to deploy, manage, and upgrade a Concrete CMS website

Improvements?

Let us know by posting here.