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.

Testing if a preload replacement is set

June 13, 2012 1:52pm

Subscribe [1]
  • #1 / Jun 13, 2012 1:52pm

    Matthew81

    81 posts

    I’m using a global header snippet to insert everything from my doctype to the closing </head> tag.

    Some, but not all, of my templates may require additional information added to the <head> section of the page.  I was planning to use preload replace variables for this, but I’m having difficulty getting it to work.

    Specifically, I’d like to place something like the following in my header snippet:

    {if {pre_head} != ""}
     {pre_head}
    {/if}

    This doesn’t work and I haven’t found a variation that does, either.

    I could always just put {pre_head} in the header snippet and then just define it on every template, but that seems cumbersome and I’d rather find a way to test if it exists, if possible.

    Any good way to do that?

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

ExpressionEngine News!

#eecms, #events, #releases