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.

{homepage} variable issue and question re: general best practices for links

February 04, 2010 12:47pm

Subscribe [1]
  • #1 / Feb 04, 2010 12:47pm

    pshudgins

    7 posts

    Hello, all… I developed a site, and found myself using the “homepage” variable quite a bit. Then, when ramping up for launch, I removed “index.php” from the site.  What I found was that any link on which I had used the homepage variable, e.g., <a href=”{homepage}/contact_us/”>, no had two slashes in the middle: http://www.sitename.com//contact_us.

    So, the first question is:  Is there a global way to fix this double slash issue?  I already removed index.php with htaccess, and removed it in the admin/config area as well… and cleared the cache.  But, the double slashes are still there.

    Second question:  What are some best practices in terms of adding links through EE?  Is it best to use “homepage” or “site_url” or “path=...”?  Maybe it’s best to remove index.php at the outset, when developing a site, then use “site_url” consistently?

    Finally, easy way to teach people how to add relative links through the CMS? 

    Thanks for your responses… really appreciate it.

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

ExpressionEngine News!

#eecms, #events, #releases