Forums

[resolved] Alphabetical Index - including Posts, Pages and Tags combined (2 posts)

  1. traumm
    Member
    Posted 4 months ago #

    Hi there!

    I'm working on an Index page for a movie archive site.

    Similar to this topic - but the index needs to include posts (the Movies themselves), pages (Directors) and Tags.

    e.g.

    #A#
    Action (Tag - this links to the corresponding tag archive)
    Aladdin (Movie - this links to a Post named 'Aladdin')
    ALLEN, Woody (Director - this links to a Page named 'ALLEN, Woody')
    Aliens (Movie)

    #B#
    Bambi (Movie)
    Being John Malkovich (Movie)
    BURTON, Tim (Director)

    #D#
    Dirty Harry (Movie)
    Dracula (Movie)
    Drama (Tag)
    Dumbo (Movie)

    #F#
    Frankenstein (Movie)

    Hope this makes some kind of sense - any help or a prod in the right direction would be much appreciated. I searched high and low for an example of this topic being raised before but couldn't locate anything.

    Many thanks in advance for any help! :)

  2. traumm
    Member
    Posted 4 months ago #

    In case anyone finds this whilst searching on a similar problem, I managed to solve it, using array_merge to combine tags, posts and pages, then using usort with a compare function to sort them alphabetically.

Reply

You must log in to post.

About this Topic