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.

Create links to external websites?

November 04, 2010 8:53pm

Subscribe [4]
  • #1 / Nov 04, 2010 8:53pm

    ozmo

    56 posts

    Hi all,

    Basically I just want to create links to external websites.

    I have a member company list in the form of a table displaying the companies in ascending order. Some of the companies have direct links to their individual websites.

    I have created a channel (member_companies) which contains a text input custom field (company_url).

    Below is my attempted code for the table containing the URL and company name.

    <table border="0" cellspacing="0" cellpadding="0">
    <tbody>
    {exp:channel:entries channel="member_companies" dynamic="off" sort="asc"}
    <tr>
    <td><span><a href="http://{company_url}">{title}</a></span></td>
    </tr>
    {/exp:channel:entries}
    </tbody>
    </table>

    The displaying result on the page is the URL followed by the Title. e.g.

    <a href="http://www.membersite.com.au&gta">http://www.membersite.com.au">a</a> Member Company Ltd

    And the path is all messed up. e.g.

    <a href="http://www.mysite.com.au/corporate/companies/&lta">http://www.mysite.com.au/corporate/companies/<a</a>

    Where am I going wrong?

    Thanks,
    Rob

  • #2 / Nov 05, 2010 12:08am

    the3mus1can

    426 posts

    Under Admin > Channel Adminstration > Channel > member_companies > Edit Preference > Channel Posting Preferences.  Do you have “Automatically turn URLs and email addresses into links?” set to yes?  I so set it to no for that channel.

  • #3 / Nov 05, 2010 12:24am

    ozmo

    56 posts

    Ok… so it was set to yes so I set it to no and now the title is displaying correctly but the resulting link is still wrong. e.g.

    <a href="http://www.mysite.com.au/corporate/companies/http://www.membersite.com.au">http://www.mysite.com.au/corporate/companies/http://www.membersite.com.au</a>

    So…

    Any ideas where to now?

    Thanks again,
    Rob

  • #4 / Nov 05, 2010 12:32am

    mjds

    29 posts

    Your field for the url is set to format None right? Not XHTML?

  • #5 / Nov 05, 2010 12:48am

    ozmo

    56 posts

    Your field for the url is set to format None right? Not XHTML?

    Yes. Default Text Formatting for This Field option is set to None.

  • #6 / Nov 06, 2010 3:57pm

    John St-Amand

    865 posts

    Sine the is not in your template, it’s coming from somewhere else - and even though your format is currently none, it may have been saved previously with XHTML format - and if all entries with that field type were not updated at the time the change was made, it would retain that info.  I’d try emptying the field and saving, then edit it again and put the address back in - see if that clears it up.

  • #7 / Dec 06, 2010 8:45am

    xotox

    109 posts

    hi all,
    i having the same prolem and i am using ee 1.6.9
    any idea how to accpomlish this?


    thanks in advanced

  • #8 / Dec 06, 2010 8:45am

    xotox

    109 posts

    hi all,
    i having the same prolem and i am using ee 1.6.9
    any idea how to accpomlish this?


    thanks in advanced

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

ExpressionEngine News!

#eecms, #events, #releases