Skip to content
fzTagPlugin originally started as rewrite of dmTagPlugin to adjust it to symfony 1.4. Now you can easily add tags to models in any symfony app.
Branch: 1.2.x
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
modules property fix, to stop prompting error in Opera Dragonfly May 5, 2011
README missing change in normal readme Apr 4, 2011



This plugin provides similar functionality to that provided by dmTagPlugin for Diem CMF. It's in fact backported dmTagPlugin, with few tweaks more than just clearing all diem specific code:

For news about fzTagPlugin, please visit fizyk's website.


To install plugin from symfony plugin repository run:

./symfony plugin:install fzTagPlugin

To install plugin from package, copy it to your project root's directory and run:

./symfony plugin:install fzTagPlugin-1.2.6.tgz

After installing, you have to run:

./symfony doctrine:generate-migrations-diff
./symfony doctrine:migrate
./symfony doctrine:build --all-classes

Now you're ready to configure and use tags for your project


Some basic configuration is being done automaticlly:

  • Route is being registered when you enable fzTagAutocomplete module for app
  • Tag widget is being added, when you add fzTaggable behaviour to your model.


To add taggable behaviour to your model edit your schema.yml file:


    #Other behaviours
    #Other behaviours

After adding behaviour run:

./symfony doctrine:generate-migrations-diff
./symfony doctrine:migrate
./symfony doctrine:build --all-classes

###Autocomplete widget appearance###

If you want to show autocomplete widget to the user, first of all, you have to enable fzTagAutocomplete module for the app, that the widget has to be included:

    # Some settings
    enabled_modules: [default, fzTagAutocomplete]

Without this, autocomplete widget wouldn't be included into the form of taggable object. Enabling this module will also append a route that the widget is getting tags from.

There might be however some cases, where you wouldn't like the autocomplete widget to show for specified form only, if that's the case, all you need to do, is to unset tags_list field in your form's configure() method:

public function configure()
    unset( $this['tags_list'] );


To be able to use FCBKcomplete, you have to include jQuery library. Either locally, or from Google code. FCBKcomplete won't be working without it!

Here are settings for fcbkcomplete script that can be set for tagging per app basis:

    fcbkcomplete:           # options to pass to the jQuery.fcbkcomplete plugin
                            # see
      newel:          true  # show typed text like a element
      filter_case:    false # case sensitive filter
      filter_hide:    false # show/hide filtered items
      maxshownitems:  30    # maximum numbers that will be shown at drop-down list (less better performance)
      maxitems:             # maximum item that can be added to the list
      firstselected:  false # automatically select first element from drop-down
    list_max_tags:    10    # number of tags shown on a list
    list_sort_default:      # default list order
      by:             name
      order:          asc

Unlike in dmTagPlugin, the complete_text parameter is configured through i18n string.

You can also configure some options on per model basis:

    #Other behaviours
            maxshownitems: 10
            maxitems: 15
            newel: false
            firstselected: false
    #Other behaviours

If you won't configure these options per model, it'll default to those defined in app.yml



There's an admin module, that you can activate in your backend app:

    # Some settings
    enabled_modules: [default, fzTagAdmin]

The route for the fzTagAdmin module is fz_tag and will be added to your app when the fzTagAdmin module is enabled.


plugin also contains front end module to show either tags list or tag's page. Both actions get routes included as soon as fzTag module is enabled:

    # Some settings
    enabled_modules: [default, fzTag]

Routes names are:

  • fz_tag - for tags list
  • fz_tag_show - for tag's show page


  • fzTag:calculate-weight - this task should update each tag's count attribiute - number indicating how many times tag was used. Depends on how many tags and taggable models are in project it may take quite a lot of time and/or memory to do that.


fzTag comes with two components:

  • list - is a simple component showing list of tags

  • tagCloud - is a simple tag cloud component. By default it shows 20 most popular tags ordered by their popularity. You can overwrite that by passing limit parameter to component:

      <?php include_component('fzTag', 'tagCloud', array('limit' => 25 ));  ?>
  • 3dTagCloud - components that generates spherical tag cloud using jquery.tagsphere jQuery plugin created by elbeanio. It's functionality extends that of tagCloud component. Call and options (default values):

      <?php include_component('fzTag', '3dTagCloud',
                              'limit' => 25,
                              'width' => 100,
                              'height' => 100,
                              'min_font_size' => 10,
                              'max_font_size' => 16,
                              'zoom' => 100
                              ));  ?>
  • canvasTagCloud - components generating tag cloud in canvas html5 element using TagCanvas jQuery plugin created by Graham Breach. it supports all plugin's options as component's options as well as width and height for canvas element:

      <?php include_component('fzTag', 'canvasTagCloud',
                              'limit' => 25,
                              'height' => 100,
                              'width' => 100,
                              'maxSpeed' => 0.05,
                              'minSpeed' => 0.0,
                              'decel' => 0.95,
                              'minBrightness' => 0.1,
                              'textColour' => "#000000",
                              'textHeight' => 15,
                              'textFont' => "Helvetica, Arial, sans-serif",
                              'outlineColour' => "#000000",
                              'outlineThickness' => 1,
                              'outlineOffset' => 5,
                              'pulsateTo' => 1.0,
                              'pulsateTime' => 3,
                              'depth' => 0.5,
                              'initial' => null,
                              'freezeActive' => false,
                              'reverse' => false,
                              'hideTags' => true,
                              'zoom' => 1.0,
                              'shadow' => "#000000",
                              'shadowBlur' => 0,
                              'shadowOffset' => '[0,0]',
                              'weight' => true,
                              'weightMode' => "size",
                              'weightSize' => 1.0,
                              'weightGradient' => array('0' => '#f00', '0.33' => '#ff0', '0.66' => '#0f0', '1' =>'#00f'),
                              ));  ?>

In all three tag clouds, there's option to create cloud out of custom tags, just pass collection of tags as parameter called tags along with tag clouds settings, eg:

    <?php include_component('fzTag', 'tagCloud', array('tags' => $object->getTags() ));  ?>

Of course, you can use any default tag cloud this way.

Would it happend you'd want two different tag clouds on one page, all you need to set is 'cloud_id' option:

    <?php include_component('fzTag', 'tagCloud', array('cloud_id' => '1 ));  ?>

It's needed only for canvasTagCloud or 3dTagCloud but parameter is also accepted on tagCloud component as well.



Great thanks to Thibault Duplesis, who developed the original dmTagPlugin for Diem CMF


  • English - Grzegorz Śliwiński
  • Polish - Grzegorz Śliwiński
  • Spanish - Alex Otero

Support and Help

fzTagPlugin is completely free, but you can support it's creator:

support fzTagPlugin

For help regarding this plugin, you can go to plugin's github issue tracker, or contact author via jabber/xmpp/gtalk protocol: or though e-mail:

You can’t perform that action at this time.