Can I use Smarty to display an image?

Discussion in 'Templates customization' started by twholycross, Jul 4, 2008.

  1. twholycross

    twholycross aMember Pro Customer

    Joined:
    Jan 30, 2007
    Messages:
    63
    I am using a link to pass and print a text variable to the signup page and it works fine. I would like to do the same with an image. Is this possible? ie I have a link like this:

    https:/yoursite.org/amember/signup.php?state=Wyoming

    and it displays using:

    {$smarty.get.state}

    Can I do the same for a graphic? I would like to have a different header graphic called based on what I put in the link. what is the syntax?

    https:/yoursite.org/amember/signup.php?state=Wyoming?html_image=/images/wyoming.jpg


    {$smarty.get.html_image}

    Any help would be appreciated. I obviously do not know much about smarty....or billions of other things
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Yep, you should be able to do it something like
    <img src="/images/{$smarty.request.state}.gif>

    David
  3. twholycross

    twholycross aMember Pro Customer

    Joined:
    Jan 30, 2007
    Messages:
    63
    Davidm1 you just made my week. Thank you very much! Works fantastic!

Share This Page