Creating Links
External and Internal Links
Links in Harmony are a simple way to create items in your site structure that link either to another site, or to a different location on your own site. With Harmony, these link items allow you this flexibility while keeping a simple and familiar workflow.
To create a link, start by selecting ‘Manage Content’ in the Site Content sidebar, then click either the + in the bottom left of the Content sidebar, or the ‘Add Content Here’ link at the bottom of the existing content list. To create a link as an item under an existing page, click the + button to the right of the parent pages title in the sidebar.
Once the form has loaded, select ‘Link’ from the menu at the top of the form, and then fill in the title of the link, along with its URL. Links, like pages, can either be published or unpublished by checking the box at the top of the Link sidebar.
Using Links in Your Templates
When referencing a link item in your template, using the path
or url
method will return the URL you entered for the link. This will work seamlessly with filters like link_to_item
.
{{ link.path }} # http://linkurl.com
{{ link | link_to_item }} # <a href="http://linkurl.com">Link Title</a>
Links and Templates
Because a link will never be seen on your site (if the path to the link is loaded, we will forward the person to the URL on the link), there’s no need to have a template.
Deleting a Link
To delete a link, just click the ‘Delete this Link’ button at the bottom right of the link editor. You’ll be asked to confirm this, just to make sure you didn’t click it by accident.