Attribute ID doesn't seem to be getting properly associated with attribute element

  • I have a navigation template in which I'm trying to include an image as a site attribute, but it's not working.


    I create an attribute template that just includes:

    Code
    1. <perch:pages id="logoimage" label="Site Logo" type="image" />

    Then I added this to my navigation template:

    Code
    1. <perch:if exists="logoimage">
    2. <div class="pure-u-1-2 text-left">
    3. <a href="[url]">
    4. <img src="<perch:content id="logoimage" label="Site Logo" type="image"/>"/>
    5. </a>
    6. </div>
    7. </perch:if>

    Note that the ID of "logoimage" matches the exists="logoimage". I then uploaded an image to the attribute in the page settings. I've confirmed that the image url is accurately being captured in the attribute. The problem seems to be that the ID isn't being associated with the image so the <perch:if> statement doesn't think the condition is met and the following image tag doesn't know what to use for the src.


    I can't find an error in my syntax...any help? Thank you.

  • drewm

    Approved the thread.
  • jeremyJDK

    Changed the title of the thread from “Attribute ID doesn't seem to be getting properly associated with attribute lement” to “Attribute ID doesn't seem to be getting properly associated with attribute element”.