Organizing Clarity’s Content

In the previous section, you learned about the different types of content that Clarity wants to employ for their enterprise marketing website. This section covers categories and tags, two vital tools for organizing content in Liferay.

Categories are rigid and hierarchical, while tags are flat and freeform. Use categories when you need a formal, top-down structure that integrates with your site’s architecture (e.g., navigation and display pages) and helps you enforce content standards and requirements. Use tags when you need flexible, user-driven organization to highlight keywords and enhance your site’s search experience. Often, as in Clarity’s case, your solution will require a combination of the two features.

Categories

You can use categories to group assets with similar content or information. Categories support hierarchical organization of your content with nesting and subcategories so that you can classify your content in as much or as little detail as you wish. This makes it easier for users to find relevant information through search or navigation.

Categories themselves are grouped into vocabularies, which can be public or private. A vocabulary defines the type of asset for the categories it contains. For example, Clarity’s Blog Posts vocabulary contains four categories: Innovation, Fashion, Technology, and Health. Content creators can only apply these categories to blog posts. Liferay includes some basic vocabularies out of the box, but you can create your own.

Together, categories and vocabularies form a taxonomy, a structured classification system for content. Implementing a robust taxonomy is critical for effectively managing content in Liferay.

Tags

Tags are keywords for organizing your assets. While categories provide broader classification based on theme or topic, tags describe more specific information about individual content items. Tags are not hierarchical and cannot be nested within one another. However, because they are not constrained by a vocabulary, tags make it possible to find related assets even if they are different types. Both administrators and regular users can create tags for content.

Exercise: Auto-Tagging Content

You can manually tag most Liferay assets, but manually tagging content can be time consuming. Liferay provides auto tagging features and integrations to simplify this process. By default, auto tagging is disabled.

Here you’ll enable text and image auto-tagging as the Clarity Admin user.

To do this,

  1. Open the Global Menu (Global Menu), go to the Control Panel tab, and click Instance Settings.

  2. Under Content and Data, click Assets.

  3. Click Asset Auto Tagging in the left menu.

  4. Check Enable Auto Tagging of Assets.

  5. Set the max number of tags to 3.

    Note

    Leaving the field blank disables auto-tagging. Setting the value to 0 removes any auto limit.

  6. Click Update.

    Now that it’s enabled, we need to set up our tagging providers for web content articles and images.

  7. Click OpenNLP Text Auto Tagging in the left menu.

  8. Select Web Content Article in the drop-down menu.

    If the drop-down menu does not appear, enter com.liferay.journal.model.JournalArticle.

    Note

    You can also click the plus button to enable OpenNLP auto tagging for additional types of text content (i.e., blog entries = com.liferay.blogs.model.BlogsEntry; documents = com.liferay.document.library.kernel.model.DLFileEntry).

  9. Click Update.

  10. Click TensorFlow Image Auto Tagging in the left menu.

  11. Check Enable TensorFlow Image Auto Tagging.

  12. Click Update.

    Tip

    You can double check that all the settings are correct for the Clarity site by going to Site MenuConfigurationSite SettingsAssets and validating that auto tagging is enabled.

  13. Go to Clarity’s enterprise website, open the Site Menu (Site Menu), expand Content & Data, and select Web Content.

  14. Go to the Articles folder, click New, and select Article.

  15. Enter some data. This data should be something real and not “Lorem Ipsum” because Open NLP needs to interpret it and provide some tags.

  16. Click Publish.

  17. Begin editing the article. In the right side menu, you should see tags set for the content.

Exercise: Creating a Vocabulary

Liferay provides vocabularies for categorizing content, making it easier to find and display the content you need.

Here you’ll define a vocabulary with categories for the FAQ web content as Walter Douglas.

To do this,

  1. Sign in as Walter Douglas.

    • Email: walter.douglas@clarityvisionsolutions.com
    • Password: learn
  2. Open the Site Menu (Site Menu), expand Categorization, and select Categories.

  3. Click Add (Add) next to Vocabularies to create a new vocabulary.

  4. Enter these details:

    FieldValue
    NameFAQ
    DescriptionCategories for FAQ articles.
    Allow Multiple CategoriesYes
    VisibilityPublic
    Asset TypesWeb Content Article
    SubtypeFAQ
    RequiredNo

    Choose which asset types the vocabulary will be associated with.

  5. Click Save to create the vocabulary.

You now have a vocabulary to contain FAQ categories.

Exercise: Adding Categories to a Vocabulary

After creating a vocabulary, you can add categories and subcategories to establish the desired organizational schema for your content.

Here you’ll add categories to the FAQ vocabulary you created in the previous exercise as Walter Douglas.

To do this,

  1. In the Categories application, select the FAQ vocabulary in the Vocabularies sidebar.

  2. Click New to add a category.

  3. In the Add New Category page, enter Retail Partners as the name.

  4. Click Save to add the category.

  5. Repeat the above steps to add three more categories to the FAQ vocabulary:

    • Products & Services
    • Pricing & Ordering
    • Returns & Exchanges

    Create and use categories according to your content.

  6. Challenge: Assign the correct category to each FAQ web content article. The FAQs are sorted into folders corresponding to their categories.

    Hint: Look in the Properties sidebar for each FAQ.

You have now defined and assigned categories to your FAQ web content.

Conclusion

Great! You’ve used tags and categories to organize Clarity’s content. Next, let’s learn how to display Clarity’s content with collections.

Next Up: Displaying Clarity’s Content

Additional Resources

See official documentation to learn more about Liferay’s content organization features:

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy