Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>URL are generated according to the <a href="http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Concepts-and-basics/Content-management/The-content-class#eztoc86559_1_4" rel="nofollow">'URL alias name pattern' parameter when editing a class</a>.</p> <p>This means that if you have a class with a <em>title</em> (string type) and a <em>date</em> (date type) attributes, if you use <code>&lt;title&gt;-&lt;date&gt;</code> in the URL alias name pattern field, the URLs will look like : <a href="http://my.domain.com/Titre-article-mardi-23-juillet-2013" rel="nofollow">http://my.domain.com/Titre-article-mardi-23-juillet-2013</a> </p> <p>Technically the value used by the system to determinate what to use in the URL is given by the <code>title()</code> function of each datatype. Exemple for the date datatype : <a href="https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/datatypes/ezdate/ezdatetype.php#L273" rel="nofollow">https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/datatypes/ezdate/ezdatetype.php#L273</a> The date will be based on your locale but according to the source code I guess that you won't be able to alter the format used (ex: %Y-%m-%d) properly and without hacking the code.</p> <p>That said, there's not solution to add something else than information coming from content attributes, and <code>node_id</code> is a property of the object, not an attribute.</p> <p>To solve your issue, I would recommend to create a <a href="http://share.ez.no/learn/ez-publish/creating-datatypes-in-ez-publish-4" rel="nofollow">custom datatype</a> which will not do nothing more but implementing a <code>title()</code> function to return what you want for your URL pattern (in your case, the date in the format you want, plus the <code>node_id</code>).</p> <p>Hope this helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload