Jump to:

23370 Posts in 18145 Topics by 2864 members

General Questions

SilverStripe Forums » General Questions » Linking & changing page URLs

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1269 Views
  • amalet
    Avatar
    Community Member
    7 Posts

    Linking & changing page URLs Link to this post

    Hi

    I've been looking at a few CMSs to build sites in and the two I've found most promising are SilverStripe and ModX. I've been leaning more towards SilverStripe but there is one feature of ModX that looks pretty useful:

    When linking to pages in your site in ModX you just use the page's ID. The URL then gets resolved automatically. This means that if the URL/name of a page is changed then links from other pages still work.

    Is there an easy way to do something like this in SilverStripe or is linking to other pages done just using the URL? The page IDs don't seem to be displayed anywhere in the CMS.

    I'm worried that after setting up links from say the home page to other parts of the site, if we then give the client access to the CMS and they change the URL of a page then none of the links will work any more.

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Linking & changing page URLs Link to this post

    When linking to pages in the CMS using the insert link sidebar, the links are inserted in the format "[sitetree_link id=...]", so they are in fact being linked to by ID. These are rewritten on page load. If you insert a link and then view the raw HTML you can see this.

    Additionally, if a user visits an old URL that has been renamed, they are automatically redirected to the new URL.

  • amalet
    Avatar
    Community Member
    7 Posts

    Re: Linking & changing page URLs Link to this post

    Thanks for the reply.

    Is there any way to do this when linking from templates? For example in a footer navigation where only select pages are linked to.

  • Ducki
    Avatar
    Community Member
    2 Posts

    Re: Linking & changing page URLs Link to this post

    I'm running into the same issue.
    How do you create URLs the correct way?

  • Rodolfo
    Avatar
    Community Member
    11 Posts

    Re: Linking & changing page URLs Link to this post

    Same question here ?

    How do I insert a link into the template?

    1269 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.