1

I have an article called Main Article and I am rolling out the chapters each week (8x). So, each chapter will have the MAIN Article Title AND Chapter Title. eg: Stories from the top of the World; The Journey of the arborists

Stories from the top of the World; The way to the top etc, etc...

I could create the MAIN Article as a single entry (with an excerpt) but this is not the brief from the client and use a relationship field to add the chapters to the Main Article Title.

I could add the Main Article title as a category and select this at each chapter entry, but how do I create the URL format to do this? This might also be tough to explain as a workflow for the client....

articles/{category}/{slug}

What else are the options?

2

You can set the URL format to be anything you want really, just setup your templates and then setup some routes; then it's all going to work automatic for your client and they never have to worry about it.

  • Thanks Christopher, this is my first site in Craft, so I need to wrap my head around the routing. Nevertheless it's awkward to add a title as a Category - I wonder if there is another way? – Nutmeg Sep 26 '16 at 2:15
  • If it's a pre-set number of entries you could use a Structure rather than a Channel, then it'd all flow automatically and make logical sense to everybody without the need for any fancy logic. – Christopher Healey Sep 26 '16 at 2:20
  • yes, that would make sense, but there os no way of knowing how many chapters future articles will have.. – Nutmeg Sep 26 '16 at 20:10
  • The point though is that you want a set of entries that HAVE a relation to each other and hierarchy. That is Exactly what the Structure section type is meant for. So your options as I see it are, do it however you think makes sense to you and setup routes to handle the URLs, OR use a Structure and you don't really have to do anything that isn't basic and standard. – Christopher Healey Sep 26 '16 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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