Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Hierarchical Categories and Tags for reports

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 857 Views
  • kindlemanwill
    Avatar
    Community Member
    67 Posts

    Hierarchical Categories and Tags for reports Link to this post

    Hello,

    I have a page type called reports, and i want to put them into categories. Categories will have subcategories, so hierarchical.

    I Also want to classify reports by tag.

    Ill then want to in the front end: show all reports by tag, show all reports by category, and show reports by category and filtered by tag.

    So my plan is, use the tagsField module using the model method (rather than text) for the tags.

    Then have a reportsHolder in which all the reports live, and have them some how assigned to categories - using the datagrid or DOM or something.

    Is that going to work out for me? Will the front end stuff work out? can anyone tell me more about what I ought to be doing about the assigning the categories to reports, and how i give them titles & descriptions etc?

    alternatively, am i doing it wrong? I'm super new to SS, and I'd rather do it in as standard a SS way as there is, rather than swimming upstream.

    Thanks for any tips,

    will

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: Hierarchical Categories and Tags for reports Link to this post

    I haven't used the TagField module but I have done similar things using a ComplexTableField in the front end

  • kindlemanwill
    Avatar
    Community Member
    67 Posts

    Re: Hierarchical Categories and Tags for reports Link to this post

    I have abandoned that plan then.

    After reading the forums a bit, seems like if the categories have their own page, they should extend the page class, otherwise its just too hard. so i now have holder, categories and reports all extending pages, so the tree now provides the hierarchy by nesting the categories. all good.

    I still need to be able to add reports to more than one category, so I have implemented a TreeMultiselectField so i can select other categories for the report.

    It works, but i'd like to be able to limit what it displays to the category pages. I don't think thats possible.

    Is there any other way to show all items of a certain page type of the tree, multi-selectable?

    w

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: Hierarchical Categories and Tags for reports Link to this post

    Well the TreeMultiselectField is Child of TreeDropdownField which has a filter function, so in theory you should be able to use that function

    http://api.silverstripe.org/2.4/forms/fields-relational/TreeDropdownField.html

  • davede
    Avatar
    Community Member
    24 Posts

    Re: Hierarchical Categories and Tags for reports Link to this post

    Hi,

    Did you ever find a solution to filtering out your sitetree field to only one part of the sitetree?

    We're looking to do the same thing: allow a selection of a hierarchical categories for pages.

    857 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.