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.

Category in reverse related link

January 10, 2011 4:58pm

Subscribe [4]
  • #1 / Jan 10, 2011 4:58pm

    Sjoerd

    233 posts

    This question may be related to a resolved thread.

    I forgot the category. This is not working, it shows every category instead of only category id 4.

    <form id="form">
    <select name="jumpMenu" id="jumpMenu">
    {reverse_related_entries weblog="publicaties" category="4"}
    <option value="{url_title_path='publicaties'}">{title}</option>
    {/reverse_related_entries}
    </select>
    </form>
  • #2 / Jan 11, 2011 8:14am

    Sue Crocker

    26054 posts

    Which build/version of EE1.x are you using?

  • #3 / Jan 11, 2011 8:19am

    Sjoerd

    233 posts

    For this site: 1.6.8
    In the meantime I discovered that it is impossible to use categories in reverse related entries. Right?

  • #4 / Jan 12, 2011 2:34am

    John Henry Donovan

    12339 posts

    Sjoerd,

    That is correct. It only supports six of the typical parameters used by other ExpressionEngine tags

    {reverse_related_entries weblog="default_site" status="open" sort="desc" orderby="title" offset="5" limit="10"}
    
    {/reverse_related_entries}
  • #5 / Jan 12, 2011 10:25am

    Sjoerd

    233 posts

    Thanks. Is it possible to conditional hide a whole div or select or whatever when there are no related entries?

    From the manual:

    {reverse_related_entries sort="desc" orderby="title"}
     {if no_reverse_related_entries}
      <h2>No Events for This Performer</h2>
    <p> {/if}<br /></p><h2>{title}</h2>
    <p> {body}<br />
    {/reverse_related_entries}

    In the method above there is always ‘No Events for This Performer’. A selectbox or styled div would act the same: ‘No Events for This Performer’.

    But it is more fancy to hide the whole div or select. For now I did the trick with Brandon Kelly’s P&T Switch and an ‘if’ statement in the template. I suppose this is the only way?

  • #6 / Jan 12, 2011 7:42pm

    Sue Crocker

    26054 posts

    If it works, I’d say stick with it. We can always move this to the CodeShare Corner if you want to go further with figuring out another method. Let me know if you want to move it.

  • #7 / Jan 13, 2011 4:40am

    Sjoerd

    233 posts

    No, you can close this. It’s not a big deal. Thanks.

  • #8 / Jan 13, 2011 3:46pm

    Ingmar

    29245 posts

    Very good. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases