ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Assign a global variable

November 06, 2011 3:02pm

Subscribe [2]
  • #1 / Nov 06, 2011 3:02pm

    HPCI

    17 posts

    I wish to have a site-wide template constant.
    I can do it within a template via {assign_variable:x="y"} but not across all templates.
    Well, the documentation blithely says go to control panel/templates and click on global variables.
    Fine, so I do this and it tells me

    “There are currently no global variables “

    Which is true I suppose, but not very helpful.  There is nothing to click on to add/create etc. 

    How do I create a global variable ?

    Thanks in advance.

  • #2 / Nov 07, 2011 7:49am

    Sue Crocker

    26054 posts

    Hi, HPCI. Take a look at the upper right corner of the page.. do you see a big green button labeled Create a New Global Variable?

  • #3 / Nov 07, 2011 10:14am

    HPCI

    17 posts

    Sue,

    thanks, um..actually,  no !

    I can find it in the source code, but it doesn’t render..

    <td class=‘breadcrumbRight’  valign=‘bottom’ align=‘right’>
    <span class=“crumblinksR” id=“rcrumb”  Create a New Global Variable</span>
    </td>


    I can see the button properly on other instances of Expression Engine, but not this one.  If you can think of an obvious thing that has gone wrong with the installation, I’d be grateful.

    But if not, I’ll work around it via $global_vars in path.php

    Steve

  • #4 / Nov 07, 2011 10:59am

    Sue Crocker

    26054 posts

    You may need to re-upload your /themes folder to fix the problem.

  • #5 / Nov 10, 2011 9:37am

    HPCI

    17 posts

    Thanks.
    This was a case of getting the .htaccess file and the URL to themes folder in alignment.
    Working now.

  • #6 / Nov 10, 2011 9:44am

    Sue Crocker

    26054 posts

    Glad to hear that things are working again. Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases