Jump to:

3448 Posts in 1062 Topics by 738 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Custom tag cloud

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1689 Views
  • michelle84
    Avatar
    Community Member
    5 Posts

    Custom tag cloud Link to this post

    Hi there, I'm still very new to Silverstripe, and struggling with some stuff... I hope someone here can help me a little!

    Portfolio website for author
    I'm working on a portfolio website for an author. He's got many short texts that he has written in magazines, books, newspapers and so on, and on this site he wants to showcase them.

    ContentItemPage and TextCategory
    To do this each text (ContentItem) is put on the site as a separate page with page type ContentItemPage. For each item a category can be set (for example: essay, review, fiction, etcetera). I've managed to create a DataObject called TextCategory for this. The admin can select an existing TextCategory or add one to the list and use that one. This is all working fine.

    Problem: tag cloud
    Now the problem is: I want to display all the TextCategories that have been made by the admin in a tag cloud on the homepage. So what I want to do is go through all the Content Items, and count how many times each TextCategory has been applied to a Content Item, and visualize this in the tagcloud.

    It's not working...
    I have tried many things, even using raw SQL to get this result, but nothing is working. I'm probably doing some little stupid thing wrong. Maybe someone can give me a hint in which direction I should be thinking? There must be an easy way to do something like this in Silverstripe...(I hope ;-)

    (BTW: I'm not using the blog module)

    1689 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.