Forum

Thread tagged as: Suggestions, Discussion

Site Wide Variables

An option within settings to add site wide variables which would be callable from your HTML templates. This will allow quick and easy changes of Twitter Handle, Google Plus Profile, Different Email Addresses.

Mike Harrison

Mike Harrison 37 points

  • 6 years ago

We tend to do these things as shared regions. Set it up on one page, make the region shared and then use the same region on other necessary pages.

Does this give me the ability to do something like the following :

<?php

    $google = new \stdClass();
    $google->app = [
        "secret" => "thisismysecretkey",
        "app" => "this is my app id"
    ];
    $google->profile = [
        "url" => [
            "author" => "author URL",
            "publisher" => "publisher URL"
        ]
    ];
?>

And so on to then access certain properties of my Google Object where needed for any reason? Or am I taking the Shared Region too far?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can't put PHP in a region of any sort.