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.

Best Way To Deal With External Links? (2 Questions)

November 24, 2012 11:06pm

Subscribe [1]
  • #1 / Nov 24, 2012 11:06pm

    nyc

    66 posts

    I’m trying to allow my client to enter up to 5 links so I have the following code:

    <ul id="links">
     <li>{link_1}</li>
     <li>{link_2}</li>
     <li>{link_3}</li>
     <li>{link_4}</li>
     <li>{link_5}</li>
    </ul>

    Questions

    1. Whats the simplest way to set this up for my client so all they have to do is type the word in the field like “google” , highlight the words and add a link so it will link to “http://google.com”?  Is there a field type specifically for links so nothing will be added but the anchor?

    2. The code above works for displaying the links, but not all of the links will be added all the time but I’ll still be left with blank list items. If there is no link in #4 or #5, how do I stop it from displaying the <li> </li> for both of those fields?

     

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

ExpressionEngine News!

#eecms, #events, #releases