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.

Template Code Expands Incorrectly

June 20, 2011 12:46am

Subscribe [2]
  • #1 / Jun 20, 2011 12:46am

    Guddu

    11 posts

    All,

    I have a simple piece of code as this….

    {exp:weblog:entries weblog="mywebsite_top_products_1_5" limit="5" orderby="date" sort="desc" disable="member_data|trackbacks"}
      {top_product_image_URL}</img>
    {/exp:weblog:entries}

    {top_product_image_URL} and {top_product_url} are just Text Entry Fields in which I have values like

    http://yourmywebsite.com/images/uploads/db_file_img_722_600x6001.jpg and http://yourmywebsite.com/shop/product/sherpani-dash-small-messenger-bag/

    However, this piece of codes gets translated into something very weird.

    <img >/images/uploads/db_file_img_722_600x6001.jpg" href="<p>shop/product/golite-mens-beartooth-650-fill-down-jacket/</p>"></img>

    I am not sure why this extra paragraph html tag

    is getting added.

    Appreciate your help and guidance on this one.

    Regards

  • #2 / Jun 20, 2011 6:14am

    Mark Bowen

    12637 posts

    Hi Anurag,

    You will need to go to Admin > Weblog Administration > Weblog Management > Edit Preferences (Your Weblog Name) > Weblog Posting Preferences > Automatically turn URLs and email addresses into links?

    Choose No here and hopefully that should get rid of this behaviour for you.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #3 / Jun 20, 2011 12:09pm

    Guddu

    11 posts

    Hi Mark,

    Thanks a lot for your response.

    Following the changes that you recommended, it works fine.

    However, i had to make another change before it worked.

    I had to change the field formatting to None from XHTML.

    Is it correct this way?

    Attached is the configuration change that I am talking about.

    Please guide.

    Regards,
    Guddu

  • #4 / Jun 20, 2011 12:21pm

    Mark Bowen

    12637 posts

    Ah yes. Sorry should have mentioned that. Having the field set to XHTML will be adding in extra tags too so changing to None as you have done will get rid of that problem too.

    Glad you have it working now though.

    Best wishes,

    Mark

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

ExpressionEngine News!

#eecms, #events, #releases