0

I am using structure type entries for navigation with three fields for navigation that uses either: -customlink field (plain text) or -category entry as the source for links.

I have product categories setup like in this post: How do I add a subcategory to the URL slug for a channel entry?

This gives me the display of products I want from each category. My nav output template for category navigation looks like this:

            {% if entry.menulink|length %}

            <a  href="{{ entry.menulink.first.slug }}">{{ entry.title }}</a>

            {% elseif entry.customMenuUrl %}

            <a  href="{{ entry.customMenuUrl }}">{{ entry.title }}</a>


            {% elseif entry.productCategoryLink|length %}

            <a  class="{{ activeclass }}" href="{{ entry.productCategoryLink.first | lower }}">{{ entry.title }}</a>


            {% endif %}

My category links work to display my nice list of products. My products section is set like: https://www.dropbox.com/s/o4ia62jo7i8yo38/Screenshot%202016-03-04%2017.29.35.png?dl=0 with the section entry urls set to render an entry in the template 'flowers/_entry.html''

SO thats the setup for navigation and templates.

Two problems are occurring which I cannot resolve yet.

  1. The entry links in my category template produce nothing. When clicking on an entry from the category I get my base and site templates but the output at 'flowers/_entry.html' is never rendered. I cant work out where craft thinks the entry template for the category should be.

2 . My navigation links are inheriting the current url So if on the page 'mysite.com/category1' and i click on 'category1' in my navigation the url becomes ''mysite.com/category1/category1'

Have been round the houses for 2 days on 1 above. I don't mind a learning curve but I am in circles and not ascending the curve :)

1
  • Solved: so silly - my twig templates were using the wrong block name
    – joomkit
    Mar 5, 2016 at 0:40

1 Answer 1

2

OP solved it with using the correct block names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.