How do I load a Site Variable inside a Page or Block (stored in Fuel)?

edited November 2012 in Modules
I have a bunch of Site Variables stored in the Fuel admin and want to know the syntax for referencing it inside the fuelified blocks and pages that they need to appear on. Can someone show me how to do this?

I tried the Php variable dialog in the editor, but that only works for php variables.

Erik

Comments

  • edited 9:43AM
    If I understand you correctly, just reference it as a variable directly.
    ie. site variable name is contact_email ... just use $contact_email in your view
  • edited 9:43AM
    Yeah, doesn't work, and to clarify, I'm trying to reference this inside the markItUp editor, not in the static view file. Here are two ways I've tried this without success:

    Site variable: BIKE_SHARE_SYSTEM_NAME

    Example 1:
    {$BIKE_SHARE_SYSTEM_NAME}
    Generates this error:
    A PHP Error was encountered Severity: Notice Message: Undefined index: BIKE_SHARE_SYSTEM_NAME Filename: compiled/cec6c7d87a2e6c3a8f9f4029264e4c0f.d17.php Line Number: 3

    Example 2:
    {BIKE_SHARE_SYSTEM_NAME}
    Generates this error:
    Plugin BIKE_SHARE_SYSTEM_NAME can not be found, maybe you forgot to bind it if it's a custom plugin ?
  • edited 9:43AM
    The first example should work (you need the "$"). Are you referencing this inside a markItUp! editor within a page layout field in the CMS?
  • edited 9:43AM
    Yes, its within the body field in a markItUp editor for a Block actually, not a page, but i'm assuming it would work for either blocks or pages.
  • edited 9:43AM
    Is this in 0.93 or 1.0? I'm having a hard replicating the issue. Are you able to use it in a static view file?
Sign In or Register to comment.