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.

Email encode with a custom field?

April 07, 2008 3:01pm

Subscribe [1]
  • #1 / Apr 07, 2008 3:01pm

    Moxie Kathy

    9 posts

    Hey all -

    I’ve dug around for the answer to this and if it is, in fact, out there for give the repetitive post.  I’m trying to use this:

    {encode="[email protected]" title="Email Me!"}

    But in this manner:

    {encode="{team-member-email}" title="Email {team-name}!"}

    It adds an a href to the code when you view it so I’m wondering if this will even work at all or if I have my head up my butt.

    Just a note, this is not with site members, the “team-member-email” is a custom field in the team blog.  Thoughts? Help? Public stoning for asking a lame question?

    Thanks in advance.

  • #2 / Apr 07, 2008 3:05pm

    Ingmar

    29245 posts

    If you do use {encode}, make sure to turn off “Automatically turn URLs and email addresses into links?”.

  • #3 / Apr 07, 2008 3:07pm

    Moxie Kathy

    9 posts

    Yep.  Did that… It’s still showing me the email address with an <a

  • #4 / Apr 07, 2008 3:10pm

    Ingmar

    29245 posts

    OK, let me dig through my templates. I vaguely remember having done something like that.

  • #5 / Apr 07, 2008 3:14pm

    Moxie Kathy

    9 posts

    Awesome, thank you.  I thought it looked pretty straight forward but, apparently not. :D

  • #6 / Apr 07, 2008 3:17pm

    Ingmar

    29245 posts

    Works just fine for me. Yes, encoding adds a mailto: link to it, too, but this is standard EE functionality. So, unless I’m totally not getting your problem, your code should work just as-is.

  • #7 / Apr 07, 2008 3:19pm

    Moxie Kathy

    9 posts

    wtf.  Ok, then I must have something wacky here in the set up somewhere.  It adds the mailto: as it should but turns it in to an href after that so I don’t know.

    Check it out: http://www.athenianprop.com/index.php/site/team/

  • #8 / Apr 07, 2008 3:26pm

    Ingmar

    29245 posts

    No, not happening for me… Perhaps someone from staff will chime in on it, too.

  • #9 / Apr 07, 2008 3:30pm

    Lisa Wess

    20502 posts

    Kathy, can we back up a bit?  Create a weblog entries tag with just your custom field pulled into it, and let’s see what is output exactly.  That should be the only code on the page, so that we know exactly what’s happening.  If you can give us a link to the test template, that’d rock.  Thank you =)

  • #10 / Apr 07, 2008 3:36pm

    Moxie Kathy

    9 posts

    Hi Lisa 😊

    Here you go:
    http://www.athenianprop.com/index.php/site/test/

    This is all I have in the template:

    {exp:weblog:entries weblog="team" orderby="date" sort="asc" limit="15"}
    
    {team-member-email}
    
    {/exp:weblog:entries}

    I have all the “turn urls into links” stuff turned off.

  • #11 / Apr 07, 2008 3:47pm

    Ingmar

    29245 posts

    [Nevermind]

  • #12 / Apr 07, 2008 3:47pm

    Lisa Wess

    20502 posts

    And are you testing this with a new entry, or an existing entry?

  • #13 / Apr 07, 2008 3:56pm

    Moxie Kathy

    9 posts

    I have it just spitting out the last 15 in this blog (only 4 of which have email addresses entered into the field in question).  Shall I add a new entry?

  • #14 / Apr 07, 2008 3:58pm

    Lisa Wess

    20502 posts

    Yes, please do try it with a new entry.

  • #15 / Apr 07, 2008 4:02pm

    Moxie Kathy

    9 posts

    http://www.athenianprop.com/index.php/site/test/

    Still doing the same thing… ?  I am stumped.

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

ExpressionEngine News!

#eecms, #events, #releases