cul-2016 / site

The Quodl website - where the latest information on Quodl, the science behind it and sign up links can be found.
http://quodl-site.herokuapp.com/
MIT License
5 stars 0 forks source link

Need to fix img path on blog urls to show nav images #34

Closed Cleop closed 6 years ago

Cleop commented 6 years ago

At the moment the Quodl logo image and the burger image are not loading in the nav when you're on a blog article page because the file path is wrong:

image

image

image

This needs fixing so the correct image loads.

Cleop commented 6 years ago

This only occurs on blogs that are tagged where the url changes from:

blog/blog-name to three parts: blog/tag/blog-name

As blogs that are not tagged are displaying correctly it is not a template error but is something to do with the tagging process.

On the apostrophe blog demo site you can add a tag without changing the url although it doesn't show how you can filter by tags so I'm not sure if it's possible to do it whilst filtering.


Temporary fix: change the path for the lecturers and students filtered pages to not contain /blog: image This works but it means articles have the path: /tag/article-title in tagged cases but /blog/article-title in cases with no tag so it's not ideal


I've played around with how the pages are created and where they're created and none of that seems to make a difference apart from the number of / in the slug

So for example if you make the about page about/test/test the images no longer load. This is not an issue to do with tagging but simply the number of / in a slug.

Cleop commented 6 years ago

You can tell which pages have tags using this logic:

So I can change the file path for sourcing the logo image depending on whether an image is tagged or not using this logic.