Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6075675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:31:15+00:00 2026-05-23T10:31:15+00:00

I am having a small issue in expression engine, I have created a breadcrumb

  • 0

I am having a small issue in expression engine, I have created a breadcrumb snippet. I have created it using {if segment_} coding.

So I created an if rule for each of the pages (it’s not a huge site) however I am having a problem with one of the breadcrumb trials. I have numerous categories with a product view page, on this product view page I can’t seem to place the category in the breadcrumb. Placing the category in the actual category page is no problem, i’ve used:

{if segment_4 == "toys"}<li><a href="index.php/product/category/toys">Toys</a></li>{/if}

However on the permalink page I can’t do this as there are no toys in the url.

I know this is an easy fix, i’m just not very familiar with categories on expression engine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:31:16+00:00Added an answer on May 23, 2026 at 10:31 am

    This is a tricky question, because an entry (product) can be assigned to more than one category.

    For the sake of an example, if you are only assigning one category per product, you can use the following code for a basic breadcrumbs trail in your permalink template:

    {exp:channel:entries channel="product" limit="1"}
        <ul class="breadcrumbs">
            <li><a href="{path='site_index'}">Home</a></li>
            <li><a href="{path='product/index'}">{channel}</a></li>
                {categories limit="1" channel="product"}
                    <li>
                        <a href="{path='product/index'}">{category_name}</a>
                    </li>
                {/categories}
            <li>{title}</li>
        </ul>
    {/exp:channel:entries}
    

    Which would output something along the lines of:

    <ul class="breadcrumbs">
        <li><a href="http://localhost/index.php">Home</a></li>
        <li><a href="http://localhost/index.php/product">Products</a></li>
        <li><a href="http://localhost/index.php/product/category/toys">Toys</a></li>
        <li>Buzz Lightyear Action Figure</li>
    </ul>
    

    Depending upon how you’ve setup the taxonomy of your site (single category for products vs. multiple categories) will determine if you can safely use categories in your breadcrumbs.

    Since you didn’t post more of your code, you may choose to implement things differently, especially if you’re using an embeddd template for your breadcrumbs. However, you can extract out the necessary bits from this example to suit your environment.

    In addition, you can use ExpressionEngine’s URL Segment Variables, Category URL Indicator and Conditional Global Variables to add even more flexibility.


    I may also mention that if you’re looking for a rapid and highly customizable solution to adding breadcrumbs to your site, you might want to consider the commercial add-on Crumbly by Stephen Lewis of Experience Internet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a small issue using the classic WebLogin snippet (Not WebLoginPE) in
We're having a small issue and could use some help - we have the
I'm new to LINQ and am having a small issue. I created a DBML
Having a small issue and wondering if I'm using these correctly. In my SQL
I have created a small app having navigation UI similar to jQuery Mobile site.
I'm having a jquery issue with a small menu I have. I have a
I created a small example to demonstrate the issue I'm having. First my class:
I'm using CodeIgniter, and I'm having a small issue with sessions. I've set 'sess_expiration'
I'm on Rails 3 using jQuery. I'm having a small issue with an application
I'm having an small issue with SQLXML in SQL Server 2008. Here's my testing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.