ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Just Checking: Anyone Use Status as a URI Parameter?

March 04, 2011 7:24pm

Subscribe [3]
  • #1 / Mar 04, 2011 7:24pm

    bsrweb

    24 posts

    I’ve searched the User Guide and even checked Devot:ee for a plug-in but I take it status values aren’t really meant to be used in the URI as there’s no status_uri variable like titles?

    I wanted to be able to display a list of entries, dynamically, by their status. Navigation links would be something like:

    <a href="http://{site_url}people/speakers/confirmed">Confirmed Speakers</a>

    Speakers’ Template code:

    {exp:channel:entries channel="people" status="{segment_3}"}

    I can’t seem to get consistent results using this method and I guess using Categories instead of Status would be better? The only issue with using Categories for Status values is that I would need to use two or more sets of categories for speakers which gets the URI a bit complicated.

    EDIT:
    Fixed {exp:channel:entries} code.

  • #2 / Mar 04, 2011 8:13pm

    Mark Bowen

    12637 posts

    I just gave it a go and it seems to work fine. When you say you are getting inconsistent results what do you mean exactly? What happens or doesn’t happen that you think should / shouldn’t be happening?

    Best wishes,

    Mark

  • #3 / Mar 04, 2011 8:20pm

    bsrweb

    24 posts

    Hi Mark,

    Thanks for testing this out. The inconsistency seems to stem when a Status value is more than one word.

    For example, I had a Status value of “To Invite” originally. Realizing that this won’t work — or look very pretty in the URI — I changed the name of this Status value to “to-invite”.

    Loading the Speakers template with “to-invite” in the third segment produced inconsistent results; other speakers with different status would appear.

    Wish I still had the full {exp:channel:entries} channel code to post here… I’ve been experimenting with using Categories now and Low’s Seg2Cat extension.

  • #4 / Mar 04, 2011 8:32pm

    Mark Bowen

    12637 posts

    I just tested with a status named To Invite as well and had no problems with it so not too sure why it’s not working for yourself. Sorry I can’t be of more help here.

  • #5 / Mar 04, 2011 8:36pm

    bsrweb

    24 posts

    Thanks again, Mark, it’s *very* helpful to get a confirmation that this might really work and I just need to look over my code again. Appreciate you taking the time to do this!

  • #6 / Mar 04, 2011 8:40pm

    Mark Bowen

    12637 posts

    If you can post your code then I can take a look over it if you like.

    Best wishes,

    Mark

  • #7 / Mar 05, 2011 5:53pm

    Greg Salt

    3988 posts

    Hi bsrweb,

    Please do post the code you are trying to use. In general though, as Mark says, there should be no problem with this.

    Cheers

    Greg

    @Mark, thanks very much for your help.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases