I am a new user to Ghost but have previous experience using Wordpress and so far I LOVE Ghost! Easy, feature rich and very powerful!
I am building an online climbing topo based on membership.
It only took me around an hour to set up the structure of how I want it but I run into a problem.
Will try and explain as good as I can, sorry for my english since I am Scandinavian =).
I am trying to set up the following structure and build the site around this:
Front page–>primary menu–>list of crags–>list of climbing sectors with topos and descriptions with pictures.
An example using a internet adress made up for the sake of it:
Now everything I put under this 3rd level is not accepted by a “/” but get translated to a “-” instead under “page settings”. Why?? Therefore I can’t link to it using the normal syntax.
Now, I can easily build using the following example adress “climb.com/topo/Hokksund-sector1-routename” but it’s getting complicated and it seems unlogical to me.
What causes this? I use the dawn theme running in a docker on OMV5.
The site is under development and is private at the moment while I’m finishig building it.
Thanks for the quick response.
For a newbie like me this makes no sense at all…
I’ve never dealt with code before. I may have been lucky creating two wordpress sites with no experience and “learning by making mistakes” =).
Can you please make an example which relates to my problems?
Sorry
I want to create a topo for a place (Hokksund) witch has 3 differens sectors (sector1) and multiple routes under each sector. I want to have each sector as it’s own page with the routes listed under that page.
As an example: climb.com/topo/Hokksund/sector1/routename1 2 3 4 5 and so on.
How would this apply to the things in the tutorials?
Should I make a collection under the tag “Hokksund” and then all topos 1-5 in the example will end up there? I tried this but i couldn’t get it to work.
I need one example how to do this, aplied to my scenario, then I think I’ll manage by myself.
What I don’t understand is why you simply can’t build your own structure…
So, I’ll show you an example of how you can do this, but I think it’s going to be difficult to maintain over the long run.
First, you’ll need to tag your posts with topo, section, and whatever other data you’re using in the URL. You’ll then need to translate that data to your routing and redirects.
Next, you’ll need to edit your routes.yaml file (Settings > Labs > Routes). This is where you’ll set up the different sections (topos, places, etc.).
routes:
/topo/:
controller: channel
filter: tag:topo # This portion says to get all posts tagged "topo" and show them on the /topo/ route
/topo/hokksund/:
controller: channel
filter: tag:hokksund # This functions the same way as topo.
/topo/hokksund/sector1/:
controller: channel
filter: tag:sector1
/topo/hokksund/sector1/test-1/:
data: post.test-1
template: post # this one is a little different. You'll need to set up one of these for each of your posts. test-1 would be the slug for your post.
Lastly, in addition to the routes.yaml file, you’ll also need to update your redirects file. Here we tell go Ghost to redirect your post, Test 1, to /topo/hokksund/sector1/test-1/
301:
^\/test-1\/: /topo/hokksund/sector1/test-1/
There’s a lot going on here, so let me know if it all makes sense. I’m also keen to know if anyone has solved this problem in a different way.
Thanks man. I will try this tonight.
Bit before I do anything. With your experience, do you see something I can do to make better structure wise? You were mentioning it might be hard to maintain?
My recommendation is to everything except for the ones with test-1 in them because those you’d need to update with every post you publish. The other ones are set it and forget it.
What you sacrifice is that your post URLs will just be yoursite.com/post-name (not /topo/hok…). You will still have /topo, /toppo/hokksund, etc.
In your post itself, you could use tags to create a sort of breadcrumb effect where at the top of the post it goes / topo / hokksund / sector1 / post name, where each word would be clickable and take you to list of other topos or posts having to do with hokksund, etc.
The key here would be to put your tags in a precise order every time.
Your best bet will be to experiment a bit and see what works best for you. All of these changes are reversible and modifiable (especially before you active traffic).
I’ve been very busy due to work but I have followed your advice and managed to solve the issue by using channels and now I have 5 different primary menus at the top.
I also changed the theme to Dawn since it better suited the site I am building.
I can’t get your example about redirects to work but it doesn’t matter at the moment.
I have question however.
Is there any way to make “links” or “bookmarks” that jumps further down into an article?
Using my example I would like to have “sector1” “sector2” as clickable links at the top of an article and when I click them it will jump down to a specific place in the article describing that very sector. I haven’t been able to find a solution to this.