Results 1 to 3 of 3

Thread: Insert variable into link href in Email Templates?

  1. #1
    MichaelS is offline Junior Member
    Join Date
    Jul 2006
    Location
    Santa Cruz, California
    Posts
    8

    Default Insert variable into link href in Email Templates?

    It is possible to insert a variable into the href="$variable_here" part of a link.

    Sugar will interpret the variable and your recipient will have a link in the email that points to where you want it to go.

    $contact_url_to_visit = "http://www.mysite.com"

    In the email template HTML source I use <A href="$contact_url_to_visit"> click here </a>
    This resolves to a link to http://www.mysite.com ,

    Hope this is helpful to you.
    Last edited by MichaelS; 2011-08-12 at 01:45 PM. Reason: Figured it out

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Insert variable into link href in Email Templates?

    Yep, exactly right. If you want to embed variables in a link you have to open the HTML source and add it manually.

  3. #3
    smcnally is offline Member
    Join Date
    Jul 2005
    Posts
    17

    Default Re: Insert variable into link href in Email Templates?

    MichaelS wrote:

    In the email template HTML source I use <A href="$contact_url_to_visit"> click here </a>


    eggsurplus wrote:

    Yep, exactly right.


    when I was manually inserting an opt-out link in an email template,
    I did so with this in the HTML source:

    a href="{OPTOUT_TRACKER_NAME}"

    e.g.

    a href="{optout}"

    using the string identifiers for various variables didn't work for me; the curly braces and tracker name did.

    e.g.

    a href="$contact_tracker_id"

    I don't know if I was doing something wrong

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Insert variable in email template
    By joenineo in forum Help
    Replies: 2
    Last Post: 2011-05-02, 07:55 AM
  2. Replies: 2
    Last Post: 2010-02-08, 10:38 PM
  3. Insert Variable into email without template
    By power2nc in forum General Discussion
    Replies: 0
    Last Post: 2009-11-14, 10:15 PM
  4. insert variable into email template
    By joenineo in forum Developer Help
    Replies: 2
    Last Post: 2009-09-10, 12:35 PM
  5. Replies: 5
    Last Post: 2008-03-29, 07:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •