0

In eight years of building EE sites I have never encountered this problem before. I am building a photo section on my site that lists photos by category. Only as a category has content does the name of the category display here.

Here is the code that displays the category lists:

<div class="browse-categories col-sm-6 col-md-3">
{exp:gwcode_categories cat_id="4" show_empty="no"}<!-- China -->
<a href="{site_url}photo/category/{cat_url_title}">{cat_name}</a>
{/exp:gwcode_categories}
</div>

<div class="browse-categories  col-sm-6 col-md-3">
{exp:gwcode_categories cat_id="115" show_empty="no"}<!-- Nature -->
<a href="{site_url}photo/category/{cat_url_title}">{cat_name}</a>
{/exp:gwcode_categories}
</div>

<div class="browse-categories  col-sm-6 col-md-3">
{exp:gwcode_categories cat_id="14" show_empty="no"}<!-- U.S. -->
<a href="{site_url}photo/category/{cat_url_title}">{cat_name}</a>
{/exp:gwcode_categories}
</div>

<div class="browse-categories  col-sm-6 col-md-3">
{exp:gwcode_categories cat_id="83" show_empty="no"}<!-- Historic sites -->
<a href="{site_url}photo/category/{cat_url_title}">{cat_name}</a>
{/exp:gwcode_categories}
</div>

On the next page that displays the photo thumbnails, this works fine for all categories unless I spell out California. I currently have the category_url_title for this page truncated to calif because if I spell out california for the Category name no content will show on the page.

Here is the code for displaying the photo thumbnails:

{exp:category_id category_group="2" category_url_title="{segment_3}" parse="inward"}
{exp:channel:entries channel="photos" limit="20" category="{category_id}"  disable="trackbacks" pagination="bottom"}
<div class="photo_thumb">
<a href="{site_url}photo/image/{url_title}/{segment_3}">
<img class="preview {if photo_orientation == 'vert'} vert{/if}" src="/resources/stock/{photo_name}-tn.jpg" data-fullimg="/resources/stock/{photo_name}-preview.jpg" data-caption="{exp:char_limit total="40"}{photo_caption}{/exp:char_limit}" alt="{title}" />
</a>
</div><!-- end photo_thumb -->

{paginate}
{if "{total_pages}" != 1}
<p id="pages">Page {current_page} of {total_pages}  {pagination_links}</p>
{/if}
{/paginate}
{/exp:channel:entries}
{/exp:category_id}  

All other category names work fine. I have names from across the globe and they work without a problem. I tried the following for the category_url_title:

calif californi californiaa

They all work. Any ideas why California spelled out will not work?

  • Do you have this problem with all categories that start with a capital C? It might be related to the numeric category urls that are formatted like: photos/C123 – AllInOne Jan 16 '15 at 21:02
  • I don't think so, because if I do an incomplete spelling of California it works. It only has the problem when I spell it out. – forrest Jan 16 '15 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.