Skip to:
Content
Pages
Categories
Search
Top
Bottom

Rhetorical question about formatting urls…

  • Avatar of Grosbouff
    grosbouff
    Participant

    @grosbouff

    Hello, I’m creating a classifieds component and I have an important question here…

    Actually, I use those urls :

    • …/wordpress-mu/classifieds (directory listing)
    • …/wordpress-mu/classifieds/test666 (single classified)
    • …/wordpress-mu/members/myname/classifieds/my-classifieds (user classifieds)
    • …/wordpress-mu/members/myname/classifieds/create (creation)

    Now I would like to be more precise for directory listing.

    I have three ways of filtering, “browing” classifieds :

    • “action” (searching / proposing)
    • type (job, services, etc)
    • category (garden, computers, etc)

    Here’s my question :

    How to deal with this for urls ?

    e.g;

    ../wordpress-mu/classifieds/searching/job/computers

    should show every classified where

    • someone is searched (not “proposes”)
    • for a job
    • in computers/

    [current_component] => classifieds [current_action] => searching [action_variables] => Array ( [0] => job [1] => computers

    The problem is that the url could also be

    ../wordpress-mu/classifieds/job/computers

    • (someone is searching or proposing)
    • for a job
    • in computers/

    [current_component] => classifieds [current_action] => job [action_variables] => Array ( [0] => computers

    Or just

    ../wordpress-mu/classifieds/job/computers

    • any classifieds related to the computers category
    • [current_component] => classifieds [current_action] => computers

      You know what I mean ?

      So.. Have you ideas on how I could build a function to filter my content based on the url given ?

      Take all what’s after /classifieds/ (current_action & action_variables), and check the slug for everything to define if it’s an action, a type or a category ?

      But that mean a lot of SQL requests…

      Of course I could make it like this

      ../wordpress-mu/classifieds/action/searching/type/job/category/computers, but it will be rather ugly…

      Need your advices ! :)

      Thanks a lot guys !

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.