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.

Could someone help this rookie out?

January 26, 2011 7:39pm

Subscribe [1]
  • #1 / Jan 26, 2011 7:39pm

    joschae

    13 posts

    I’m using EE2 by the way.  I have two channels used for blog 1 and blog 2.  I have a category group for “recent tags” assigned to each blog.  I have a pull down menu where I want to show the most recent tags.. 5 total.

    If I use the channels categories tag I can pull up the list, but I can’t limit or sort the entries. If I use the channels entries tag I can’t get any data to pull up for the categories.

    Can I limit the categories tag results by (limit=”“)?
    Can I pull categories out of the entries tag?

    Thanks,

    Joe

  • #2 / Jan 27, 2011 9:14am

    joschae

    13 posts

    I’m moving my questions over to this post…

    http://ellislab.com/forums/viewthread/178803/

  • #3 / Jan 27, 2011 9:37am

    joschae

    13 posts

    Nevermind… I think that thread is closed.  I’ve basically answered both questions with the code I used here.  It’s obvious now that the categories tag can not have the limit on it, but if the global variable tag is used then a limit can be set.  Your only really limiting the number of categories being shown per entry.  If two entries have the same category then your jump menu looks a little screwed because of the duplicate entries.

    <div>
                  <h4>Recent Tags</h4>
    <p>{exp:channel:entries channel="my_blog_channel" orderby="date" limit="5"}<br />
                <ul><br />
                {categories limit="5" show_group="6"}<li><a href="http://{path=SITE_INDEX}">{category_name}</a></li>{/categories}<br />
                </ul>   <br />
    {/exp:channel:entries}   <br />
    </div>

    If blog entry one has category “sample1” and “sample2” and
    If blog entry two has category “sample2” and “sample3” then my list output shows…

    sample1
    sample2
    sample2
    sample3

    If I limit my entries to limit=“1” then I obviously won’t have duplicates, but then may have only one category in my list if only one category was selected for the blog entry.

    In overview my goal is to use Categories for a “Tagging” system then show a menu with the results.

    Devdemon.com has a module called tagger that does these tagging features well, but I can not separate the results per channel so it is no good to me.

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

ExpressionEngine News!

#eecms, #events, #releases