am-impact / amnav

Navigation plugin for Craft

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding "index.php" to URL

jayna opened this issue · comments

commented

Hi, I am new to Craft so please forgive me if this is basic. I installed your plugin and, right now, none of the URLs are working because they don't include the index.php/ within the address.

I did try and remove index.php for a cleaner URL using https://craftcms.com/support/remove-index.php and several other problem solving resources, but that hasn't worked either.

That URL you added, should do the trick indeed. Or your server doesn't support rewriting at all, in that case they should enable mod_rewrite to the apache.

commented

Thank you for responding! Yes, it turns out it was a server issue. It has since been fixed, but now I have additional questions. I need a different nav for different entries that use the same entry type template. How do I construct a conditional statement to match the correct nav with the correct entry page ID? Also, is there a way to split a nav into two columns without having to create two separate navs?

Glad you got the original issue sorted out :)

Regarding your next questions, please take a look at the getNavRaw functionality in the readme. In there you'll find an example that'll help you out with the nav being split into two columns.

This also partly answers your question about how to display a nav with conditional statements. You should use Twig for this, and there's some options you could consider. When you're on that entry template you could do something with the entry.section.handle to make conditionals for.

{% if entry.section.handle == 'yourSectionHandle' %}
    {{ craft.amNav.getNav('navHandle') }}
{% endif %}