How to install and use eZ Tags

von Edi Modrić -

Since we tagged eZ Tags extension as stable on GitHub few weeks ago, we thought this would be a good time to write something about how to install eZ Tags extension and common usages.

Installing eZ Tags extension

eZ Tags requires eZ Publish version 4.3 and above to function properly. Versions 4.2 and below are not supported mainly because they don’t have eZ JSCore extension in distribution files, and eZ Tags relies heavily on it. Other than that, there may also be some incompatibilities with APIs in mentioned eZ Publish versions, since eZ Tags is not tested on them. Also, eZ Tags uses eZ Find for suggesting tags and fetching related tags, so those features will not be available if eZ Find is not installed and activated.

For the most part, installing eZ Tags is a straightforward process. Download the stable release version from and unpack it into extension directory of your eZ Publish installation. You need to add two tables in your database, so run the following command from root of your web, replacing the example values with the real ones:

mysql -u "user" -p"password" -h"host" "database" < extension/eztags/sql/mysql/schema.sql

After that, activate the extension in your site.ini, regenerate the autoload array and clear the caches. This simple process is enough to have eZ Tags working. However, to gain access to all the functionality and speed, there are couple of more steps you can do. These steps are optional, but highly recommended:

  • To speed up loading of the tags tree in admin interface, you need to symlink index_treemenu_tags.php file from the extension, to root directory of your web (note the dot at the end of the command):

    ln -s extension/eztags/index_treemenu_tags.php .

    After that, add the following in your .htaccess file, just below "RewriteEngine On" line:

    RewriteRule tags/treemenu/? index_treemenu_tags.php
    RewriteRule ^index_treemenu_tags\.php - [L]
  • To enable anonymous users to actually see the content that is related to a particular tag, allow anonymous access to "view" view of "tags" module
  • Finally, if you wish to use tags suggestion and see related tags on tag view page, install and activate eZ Find extension and then edit the file extension/ezfind/java/solr/conf/schema.xml, add the following block of text and then restart Tomcat and reindex: 
    • Inside <schema> element add:
      <copyField source="*_lk" dest="ezf_df_tags" />
      <copyField source="*_k" dest="ezf_df_tags" />
    • Inside <fields> element add:
      <field name="ezf_df_tags" type="text" indexed="true" stored="true" multiValued="true" termVectors="true" />

Using eZ Tags

There are two sides to using eZ Tags extension. First one is in content object edit interface and the second one is a separate tab in administration where you can manage your tags (search tags, add new ones, delete them, merge two tags into one, add/edit/delete the tag synonyms and convert tags to synonyms). Image below is a screenshot of tags admin interface:

eZ Tags admin interface

Before adding tags to your objects, you need to edit your classes and add the “Tags” attribute to them. When adding the datatype to your class, you can choose if this particular attribute can use all available tags in the database, or just a particular subtree. This can be done by selecting one of the tags in tag tree popup window. If you do select one of tags, only tags below the selected one can be added to the content object attribute. If you select the root of the tree, object attribute can use all the available tags.

Image below illustrates how content object attribute edit interface looks like:

eZ Tags object edit interface

Orange items (changed to blue in version 1.0 final) represent tags that are currently present in your object attribute and adding them is easy. Just type anything into the available input field, autocomplete will be activated to show you matching tags, and after that, just click on one of the results.

If you find yourself in need to add the tags not already present in the database, enter tag name into input field and click “Add new” button which will show you a popup window to place your tag into tree hierarchy. After selecting a parent tag in popup window, it will automatically close and the tag will be added to your object.

Grey items represent tags that were suggested to you based on your current selection of tags in the attribute and tags present in other objects as your current selection.

Usage scenarios

There are several scenarios on how to use eZ Tags. It is a matter of what kind of taxonomy you need (you can find more about this topic on slides from eZ Winter Conference 2011).
Here are some general scenarios:

  1. The most obvious is to replace standard ezkeyword dataype used for open taxonomies. It basically means to let users add tags by their own. Important thing is that web admin can always rearrange the tags for better usage:
    1. for SEO: more context words in tag links (e.g. /tags/vew/Places/UK/London/BigBen)
    2. for cross linking: parent tag linking on tag pages
    3. for easier management
    4. less duplicated entries by merging and synonyms
  2. Setup a closed taxonomy with more classification where tags will be inserted in bulk. Users can only select predefined tags. Important thing is that it is very easy to manage tags if there are some changes after deployment. Also, as tags can be structured in tree hierarchy, search can be done by tag context (parent line)
  3. The mix of both previous scenarios. It is possible to simply open up a closed taxonomy or close the open one. Depends on the situation

We also hope some new scenarios will be invented by happy users :)

Website example

The first site we built that uses eZ Tags is, home of Croatian Independent Software Exporters blog. It’s a nice example of how eZ Tags can be used because it uses a mix of closed and open taxonomies (for example technologies each of the members uses in their daily work or locations where they export their products or which post type they publish on the site). Site also takes advantage of eZ Tags, together with eZ Find to search and filter blog posts based on different tags attributes. Ofcourse, eZ Find is also being used to display related tags when a tag is being viewed together with all objects related to it.


Diese Seite verwendet Cookies. Einige dieser Cookies sind unverzichtbar, während andere uns helfen, deine Erfahrung zu verbessern, indem sie uns Einblicke in die Nutzung der Website geben.

Ausführlichere Informationen über die von uns verwendeten Cookies findest du in unserer Datenschutzrichtlinie.

Einstellungen anpassen
  • Notwendige Cookies ermöglichen die Kernfunktionen. Die Website kann ohne diese Cookies nicht richtig funktionieren und kann nur deaktiviert werden, indem du deine Browsereinstellungen änderst.