Closed kilmc closed 11 years ago
Yes, just change previous.url
to parent.url
:
<header class="site-header">
...
{% elsif type == 'archive' %}
<a href="{{parent.url}}">
...
</header>
Apologies, I pasted the wrong code. I had been trying things out to get it to work.
{% elsif type == 'archive' %}
<a href="{{parent.url}}">
<h1>{{current.title}}</h1>
</a>
Currently this parent.url just sets it to the current directory, so I'm assuming something's wrong there. I've just published the latest to http://kilmc.siteleaf.net/writing/archive and if you hover over the top nav item "Writing" you'll see it points to /writing/archive instead of /writing
Ah, looks like this is an issue on our end. We'll get a fix up right away.
In the meantime, a simple <a href="../">
will work. I'll update here when the fix is live.
Sweet. Thanks Skylar.
@kilmc Deployed a fix this morning. Let us know if you run into other bugs!
The code below is how I've got my nav working on my site but in the archive section the link renders as the current directory, not the parent.
Are archive pages children of pages? If not can you guys point me in the right direction for getting this back up one level.
The url structure for my site is
kilmc.com/writing kilmc.com/writing/blog-post-name kilmc.com/writing/archive
And so I can't just send it back to the root directory, I want to keep people in the writing section.
Thanks