where cwaddcwawc is the article name. Is this a bug? See the mixed usage of / and \ in the path. Firefox doesn’t detect this absolute path due to the mix. If I do replace the / with a \ Firefox will display the directory on my disk.
Remark: My original question was why no directory was created but I did fix this somehow. Still I’m curious about the path.
I don’t see much of a difference in a page and a directory/folder. To be honest I’m working on the comment system after quite some struggling. I wanted to create a folder because I think the article folder becomes quite messy if the article, several comments comments, uploads, etc. are in the same folder without a clear saperation.
During going to bed I thought about creating a pages preset called comments and that page has all the comments as children. This wouldn’t change anything in the current folder structure but I can see more easily which comments are published/drafts and it’s easier to delete some of them.
What do you think? Why did you ask?
PS: Your idea regarding using DS is good. I changed that! On the other hand, this doesn’t have an impact on the echoed path with the /.
Well, you current way of creating the new comments page doesn’t create a page with a text file in it. Kirby has methods to create subpages and I don’t see a reason to fall back to low level folder creation when you can create a page.
Took me some time for now as I tried it with a pages: preset first but found no way to let it display my comments and found nothing helpful to me in the forum nor in the docs about it. I think I didn’t understand the pages preset.
On the other hand this solution is quickly done too (if I knew it before) and the next steps are informing the user in the front end about his comment being published. Then my comment system works and that was one of the biggest pain points to me.
@warg:
To answer your first question:
look e.g. at https://www.php.net/manual/en/function.dirname:
since a PHP version, I don’t remember the version number, slash and backslash are used without any difference on Windows.
Since Kirby 3 the Kirby core team decided, to set DS always to the slash.