Results 1 to 2 of 2

Thread: Homepage linkage

  1. #1
    New user
    Join Date
    07-26-12.
    Posts
    1

    Default Homepage linkage

    Hi,

    how to make the link to my homepage maximally short?

    What I have (example): www.example.com/home.html
    What I would like to have: www.example.com

    Of course webpage made in Contao.

  2. #2
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Homepage linkage

    There are a few ways you can do this.

    It may be as simple as setting your home page's alias to "index". I've never seen this officially documented anywhere (I sort of stumbled upon it by accident), but it seems to work for the installations I've tried it on. Try that first and see if it works for you.

    If you know a little PHP, you can tap into Contao's "generateFrontendUrl" hook (http://www.contao.org/en/hooks.html#generateFrontendUrl). You can check that the URL passed in is for the home page, and then return the URL without the alias and suffix (which I think in most cases would just be a blank string).

    The "folderurl" extension is very popular -- it lets you use subfolder-type URLs (i.e. /about/team/ceo.html). Included is a checkbox in page settings labeled "Initial Page" that makes any page act like the index page. Since we use this extension for all of our sites this tends to be the way I do it.

    One note on "folderurl" -- if you use it, you need to turn "use auto_item" off in your settings.
    Brian

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •