Skip to main content

tag component for the CubicWeb framework

Project description

Summary

The tag cube allows to add labels to an entity as a simple yet powerful way to classify your content. Tags can be used to raffinate a for search using facets.

Usage

To allow tags on an entity type, you must allow the tags relation between Tag and you entity type(s).

For instance to activate the tag functionnality on Person, Company and Division entity type, one should add to his schema:

from yams.buildobjs import RelationDefinition
class tags(RelationDefinition):
    subject = 'Tag'
    object = ('Person', 'Company', 'Division')

You should then see the tags box appearing on the primary view for entities of those type. The`TagsBox` display tags applied to the entity but also provides an easily way to add / remove tags, if you’ve the permission to do so.

More views

  • The SimilarEntitiesBox shows some entities which share the most tags together

  • The TagsCloudView, a classical, displaying a set of tags appearing more or less big according to the number of tagged entities. It’s used by the TagsCouldBox, which is not visible by default (user can activate it using their preferences) but that you can activate by default using the code snippet below:

    from cubes.tag.views import TagsCloudBox
    # make the tags cloud box visible by default
    TagsCloudBox.visible = True
  • The primary view for tags provides a tags merging interface to site administrators, very useful to manage tags on a site where people tend to express the same thing with different words, or spelling.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cubicweb-tag-1.6.0.tar.gz (13.0 kB view details)

Uploaded Source

File details

Details for the file cubicweb-tag-1.6.0.tar.gz.

File metadata

  • Download URL: cubicweb-tag-1.6.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cubicweb-tag-1.6.0.tar.gz
Algorithm Hash digest
SHA256 b241c702d4bf848d0e5a715e6b1389b46b4e6f663b666a8bf375c0b921670183
MD5 6ff6f1e05cda4ff22eb35a3923c46a89
BLAKE2b-256 a624cde0203ca483cdb1d38ccd0dce096b8dd54a864e2d401195c7bddc8d3845

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page