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.

Post title linking outside of EE using custom fields problems

January 21, 2011 5:31am

Subscribe [3]
  • #1 / Jan 21, 2011 5:31am

    zhangfei

    62 posts

    hello,

    I am trying with the help of conditional to be able to create a post with a title linking to a wbesite .

    here is my code :

    <h2 class="post_title">                         
    <a href="http://{if">{title}</a></h2>

    here is how it look in the source code when the condition is met :

    <h2 class="post_title">
                            
    <a href="http://a">http://surya-world.org</a>" alt="permalink to another test">another test</a>
    
    </h2>

    the problem is that Expressionengine add an a href tag the the custom field {direct-url} even when I have default text formating to NONE. I would like to have the raw data from the custom field is that even possible when it’s a URL ? If not how could i go about this ?

    Thanks

    Best regards

  • #2 / Jan 21, 2011 4:12pm

    zhangfei

    62 posts

    I’ve tried everything but nothing seems to do ! I know it’s possible as seen on this website and this tutorial : http://shapingthepage.com/journal/how-to-build-a-simple-tumblr-blog-with-expressionengine

    but my custom field keep getting parsed with the <a

  • #3 / Jan 22, 2011 4:39pm

    Greg Salt

    3988 posts

    Hi zhangfei,

    You will need to edit that particular channel’s preferences to switch off the “Automatically turn URLs and email addresses into links?” option.

    Cheers

    Greg

  • #4 / Jan 22, 2011 7:26pm

    zhangfei

    62 posts

    you guys rock ! it worked ! I knew it was something silly 😉

  • #5 / Jan 24, 2011 2:22am

    John Henry Donovan

    12339 posts

    Glad Greg was able to help. Feel free to start a new thread if you have any more questions

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

ExpressionEngine News!

#eecms, #events, #releases