Remember me? forgot password | register

SilverStripe Forum

10691 Posts in 2798 Topics by 1519 members

Jump to:

Site Builders

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Community » SilverStripe Forum » Site Builders » Need to Compare Contents of Table with Existing Blog Entry Tags
Page: 1 go to end Reply
Author Topic: Need to Compare Contents of Table with Existing Blog Entry Tags 94 views
  • Garrett
    Garrett's avatar
    Community Member
    63 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

    94 views
go to top Reply

Currently Online:

François, Matt Hardwick, patrics

Welcome to our latest member: patrics