Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Need to Compare Contents of Table with Existing Blog Entry Tags

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 598 Views
  • Garrett
    Avatar
    Community Member
    245 Posts

    Need to Compare Contents of Table with Existing Blog Entry Tags Link to this post

    Hi,

    I have a challenge in my Blog module that I'd really like some code help on.

    For my blog, I have created a Categories table in the database which contains the Category Name and the Tag which corresponds to that Category. These Tags are unique (e.g., Category Name "Media & PR" would correspond to the Tag "mediaandpr") so that they are not mixed up with regular tags entered by authors for individual posts.

    Now, in my Tag Cloud (and also in the posts themselves), I would like to EXCLUDE these Tags from the display, as they are misleading.

    So, how can I COMPARE the Tags in this DB table with the Tags in the PHP Tags collection? I obviously need some sort of nested loop, but this isn't going to work in the template. I want to display only the Tags which do NOT appear in this table ("Categories").

    Any help anyone could offer on this would be greatly apperciated.

    Thanks,
    Garrett

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