I have a section of type structure where I need the url to be /5minutes. I cannot make this work (note that I have changed the handle to fiveminutes. But everything I would like to be 5minutes. I even tried setting a route for 5minutes. My question then is this. Is is simply not possible to begin a route or section with a numerical value?
1 Answer
A section can't have a handle that starts with a number, but there is nothing stopping you from using fiveminutes
for the section's handle and setting the section's URL Format to 5minutes/{slug}
.
-
Yeah, I tried that and it doesn't seem to work. Does the entry template need to be fiveminutes/_entry as well? or can it be 5minutes/_entry? Oh, I should let you know I guess that I am using a section type of Structure. Commented Mar 6, 2015 at 22:39
-
Doesn't matter for the entry template as long as what you put in the CP matches what's on the file system. Just did a test locally with a structured section and it works as expected for me.– Brad Bell ♦Commented Mar 6, 2015 at 22:55
-
Okay, looks like i may have sent you down the wrong path. After further testing I am able to get entries to render. But when I hit what is should be /5minutes it is failing to render the index.html template in the 5minutes directory. Commented Mar 7, 2015 at 1:12
-
I was able to fix the /5minutes index.html issue by creating a route. Not sure if this is the proper way to make this work, but it works. Commented Mar 8, 2015 at 3:27