Integrate with the YOURLS directly from your Symphony Entries

Clone URLhttps://github.com/newsdeeply/yourls.git

Add as a submodulegit submodule add https://github.com/newsdeeply/yourls.git extensions/yourls --recursive


NoNoNoNoNoNoNoNoNoNoNoNoNoNoNoNoNoNo. Soon?



A Symphony extension that integrates with YOURLS


  1. Upload the yourls folder to your Symphony /extensions folder.
  2. Enable it by selecting the "YOURLS", choose Enable from the with-selected menu, then click Apply.
  3. Add your domain and signature values to your Preferences
  4. You can now add the "YOURLS" field to your sections.



The goal is to create a Symphony page that best represents your content as a permalink. The classic example of this is a blog with articles. The permalink structure might be /article/135/my-article.

Defining the URL Structure

Add the YOURLS field to your desired section, and enter the URL Structure of your permalink. The URL Structure field accepts full XPath expressions which will be evaluated against the XML of the Entry when saved.

For example, let's assume your permalink structure is /article/:year/:month/:date/:id/:handle and you have a simple section with a Text Input, Date and YOURLS field. The XML for a single entry may return something like the following XML:

    <entry id="174">
        <title handle="hello-moto">Hello moto</title>
        <date iso="2013-11-11T23:04:35+10:00" time="23:04" weekday="1" offset="+1000">2013-11-11</date>

The URL Structure for the relevant permalink is:

/article/{substring(entry/date/@iso, 0, 5)}/{substring(entry/date/@iso, 6, 2)}/{substring(entry/date/@iso, 9, 2)}/{entry/@id}/
Custom Slugs

By default, short URLs generated by YOURLS will be automatically generated, however if 'Allow custom slugs' is enabled, Authors will be able to enter their own slug which YOURLS will then use for the short URL.


  1. Opens the section and creates a new Entry
  2. If the field allows custom slugs, an input field is shown asking the author for the custom slug.
  3. Author enters custom slug, or leaves it empty (autogenerated) and hits Create Entry
  4. A new shortlink is created in YOURLS which references the URL structure set in the field, eg. http://example.com/article/135/my-article

Version history

Requires Symphony 2.3.3

  • Initial package