LiveWhale has always auto-generated URLs for dynamic content that you create, such as:
- Events: /my-group/event/1234-my-event-title
- News: /live/news/1234-my-news-story-headline
- Profile: /live/profiles/1234-my-name
The end of these URLs follows the format /{id}-{title}, taking the item’s system ID and adding a sometimes-shortened version of the title. Links to /{id} or /{id}-{anything else} still reach the same content, if you want to link to a shorter or “prettier” version of the URL.
In LiveWhale 2.9.3 and before, those alternate URLs were aliases—the underlying
“canonical” URL wasn’t customizable, and it was required to begin with the numeric {id}.
Since LiveWhale 2.10.0, users can now customize the URLs of their stories, events, profiles, forms, blurbs, and files on a per-item basis, even removing the {id} if they wish.
Setting a custom URL for your content
After you’ve saved a piece of content in LiveWhale 2.10.0+, you can go back to the editor and you’ll see “URL:“ and the default URL.
If you click “customize“, you’ll be brought to an interface where you can customize the URL.
After entering your new URL, click “Update” or press Enter to confirm. You will then see the new URL and a confirmation message, “After saving, links to previous versions of the URL will forward to the new one.”
You can use this to customize your URLs, even removing the initial {id} if you like:
For most content, we suggest leaving the {id} in place, as it will make it easiest to avoid running into a URL that is already in use (e.g. “homecoming,” “commencement”).
If you choose a URL that has been taken
If you do attempt to use a URL that has already been taken by another item or a redirect, you will get an error message and LiveWhale will suggest an alternate available URL based on what you had entered.
Administrators also have the ability to click “use it anyway” and auto-reassign a new URL to the other item (or delete the redirect).
Removing a custom URL
If you’ve previously customized a URL, you can click “remove” and it will reset to the default URL. As with any changes, the previous version(s) of the URL will be saved and will still redirect to the current active URL.
Custom URL FAQ
-
What happens if I don’t customize any URLs?
Nothing! Users will seamlessly start seeing the new “customize” UI, but all the existing links and functionality you know from LiveWhale CMS, Calendar, and Storyteller should work just as before. -
What characters can I use in my URLs?
URLs support lowercase letters a-z, digits 0-9, and dashes. If you try to save any other characters, they will be converted on save to match this requirement. -
Will links from before LiveWhale 2.10.0 work?
Yes: the new custom URL functionality is backwards-compatible with old URLs pointing to /{id} or /{id}-{title}, so any links you’ve already bookmarked, emailed, or shared on social media should be unaffected. -
What happens if I visit the old URL of an item?
When you visit an old URL (either a previously-customized one, or just an old-style /{id} URL) LiveWhale will grab the current canonical URL for that event/story/profile/etc. and redirect you there. -
What happens if I change the URL of an item several times?
Behind the scenes, LiveWhale will save an “archived” version of the URL each time the URL changes. Then, when any URL is visited, LiveWhale will check both active and archived URLs to match you up with the right content. -
What happens if I choose a URL that was previously used for another item, but is no longer active?
If you save a URL that was previously used for another piece of content, LiveWhale will remove it from that archive and re-assign it to your current item.
Developer/Admin FAQ
-
Can we restrict URL customizations to admins only?
Sure. By default, this functionality is available to everyone, but by using some “soft permissions” in /_ingredients/backend/backend.less you can add CSS likebody:not(.admin-user) fieldset.url_slug {display: none !important;}
to hide the URL customization interface from all non-admin users. -
Can I see what custom URLs are in use?
Yes. In LiveWhale CMS 2.10.0+, administrators can go to Toolbox > Redirects & URLs and from there, choose the “Customized URLs” submenu. This will show you a complete list of all custom URLs on your site, filterable by group and type. The list includes a link to edit or remove each one. -
Will my [widgets / API requests / theming] link to the correct version of the URL?
Yes: all LiveWhale-generated links from widget or API results will automatically update to point to a custom URL when one is present. -
How are URLs generated for repeating events and imported (Linked Calendar) events?
Same as in LiveWhale 2.9.3 and before, repeating and imported events will get auto-generated URLs based on {id}-{title} but may be customized as desired after they are created. -
Can I customize a URL via the create()/update() API?
Yes: in your $data_to_save array, use the system name “slug” to include your desired URL.'slug'=>'my-custom-url'
If the URL is unavailable or uses disallowed characters, the API will return a descriptive error message.