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 URL Titles not working

March 15, 2009 11:52am

Subscribe [3]
  • #1 / Mar 15, 2009 11:52am

    sfgolfer

    41 posts

    I am trying to view a weblog by category.

    The filtering works when navigating using index.php?/template/C1/

    However, all of the weblog’s entries appear (not being filtered) when setting “Use Category URL Title” to YES in Admin > Weblog Admin > Global. 

    The code that calls up the entries in the index template:

    {exp:weblog:entries weblog="{embed:my_weblog}" orderby="date" sort="desc" limit="15" disable="member_data|trackbacks"}


    Using Pro 1.6.7

  • #2 / Mar 15, 2009 8:36pm

    Sue Crocker

    26054 posts

    sfgolfer, what is your category trigger word? Are you using any extensions?

    What does the url look like?

  • #3 / Mar 16, 2009 10:39am

    sfgolfer

    41 posts

    what is your category trigger word?

    I’m using ‘category’.

    Are you using any extensions?

    Two extensions are being used:
    - default jQuery for the Control Panel
    - LG TinyMCE

    What does the url look like?

    index.php?/firm/category/procedures/

  • #4 / Mar 16, 2009 11:06am

    Sue Crocker

    26054 posts

    So when you visit http://example.com/index.php?/category/procedures, what do you see?

  • #5 / Mar 16, 2009 2:43pm

    sfgolfer

    41 posts

    Sue,

    The 404 page appears.

  • #6 / Mar 16, 2009 5:20pm

    Ingmar

    29245 posts

    Are you using strict URLs? Try using http://example.com/index.php?/site/index/category/procedures.

  • #7 / Mar 16, 2009 6:47pm

    sfgolfer

    41 posts

    Yes, I am using strict urls. 

    Navigating to either…

    index.php?/site/index/category/firm/
    index.php?/mlg/category/firm/

    ...results in entries from all categories.

    I’m going to do a fresh install and see if the problem replicates.

  • #8 / Mar 16, 2009 8:37pm

    Greg Aker

    6022 posts

    please let us know what you find after trying the new install.

    Regards,

    -greg

  • #9 / Mar 16, 2009 8:56pm

    Greg Aker

    6022 posts

    sfgolfer:

    On second thought, we can probably troubleshoot this without you having to reinstall.  If you have not already gone through with that, give us a hollar and we’ll pick back up.

    -greg

  • #10 / Mar 17, 2009 9:17am

    sfgolfer

    41 posts

    I did a second, separate install and Category URL does work.  So there is something on my install that is the culprit.

    Filtering by Category when not using Category by URL does work.  If I enable it then all blog entries are shown.

    I’m not sure if it is something within the template or a setting somewhere.

    This is my multi-entry index template.  Posted here is the EE portion of the template…

    
    
    

    This is the .sidebar-categories_dropdown template…

    <form name="catmenu" action="">
    <select name="selcat" class="dropdown-sidebar">
    <option value="">-- Select Category --</option>
    {exp:weblog:categories weblog="{my_weblog}" style="linear"}
    <option value="{path={my_template_group}}">{category_name}</option>
    {/exp:weblog:categories}
    </select>
    </form>
  • #11 / Mar 17, 2009 12:16pm

    Lisa Wess

    20502 posts

    If you hard-code your weblog short-names rather than assigning an embedded variable, does it work?

  • #12 / Mar 17, 2009 7:40pm

    sfgolfer

    41 posts

    {assign_variable:my_weblog="firm-weblog"}
    {assign_variable:my_template_group="site"}

    Yes.  If I use the above code on the template then all is well.  I am using the site/index template as my multi-entry page.

    Can I use a single template (site/index) for multiple weblogs?  I plan on having a few deparmental weblogs and would like to use a single template.

  • #13 / Mar 17, 2009 7:48pm

    Greg Aker

    6022 posts

    I might suggest trying to take out the my_weblog variable, and move the {embed:weblog} into the weblog tags themselves.

    -greg

  • #14 / Mar 17, 2009 7:49pm

    Lisa Wess

    20502 posts

    Yes you can, but what I meant is in the weblog= statement of the weblog entries tag.  I think that part of your issue is that you were creating an assigned variable based off an embed.  The parse order of the template could have been causing this issue.  Without that, things do work for you?

  • #15 / Mar 18, 2009 11:39am

    sfgolfer

    41 posts

    Yes.  Hard coding the weblog name does work.

    {exp:weblog:entries weblog="firm-weblog" orderby="date" sort="desc" limit="15" disable="member_data|trackbacks"}

    However, the weblog’s name is being fed to the site/index template from other embedded templates.

    Example, if I navigate to index.php?/site/firm-weblog, the firm-weblog template contains this one line:

    {embed="site/index" my_weblog="firm-weblog"}

    This works fine when viewing the individual blogs.  Also, navigating to index.php shows all entries but that’s fine since I want to list the recent entries for all blogs on the front page.

    The embedding scenario works except for when Category URL Titles is turned on (no filtering, all entries are shown).  All is well if Category URL Titles is turned off (category filtering does work).

    So I tried this in the site/index template…

    {if segment_2 == "category"}{assign_variable:my_weblog="firm-weblog|technology-weblog"}{/if}
    {assign_variable:my_weblog="{embed:my_weblog}"}

    The word “category” is defined in the Category URL Indicator in the Admin preferences.  I then list all the blogs that the category filtering should look thru.

    This seems to work thus far if Category URL Titles is turn on.  Also, all other functions within the site seem to work as expected.

    Please correct me if I’m missing something.

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

ExpressionEngine News!

#eecms, #events, #releases