Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: option to create a page without a .md file #393

Closed
ghost opened this issue Jan 14, 2016 · 28 comments
Closed

Feature request: option to create a page without a .md file #393

ghost opened this issue Jan 14, 2016 · 28 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jan 14, 2016

Hello,

I spoke with mahagr about the possibility in Gantry to have a menu item that is not clickable (for dropdown) and he said that it works (I tested it) if this page has no .md file.

Is it possible to have for example a option to create in admin a page consisting only of the folder without a .md file?

Olli

@ghost
Copy link
Author

ghost commented Jan 20, 2016

Thank you very much for your work!

@ghost
Copy link
Author

ghost commented Feb 6, 2016

The folder can not be selected as the parent page for a new page 😀

@flaviocopes
Copy link
Contributor

Try clearing the Grav cache. Does it come up?

@ghost
Copy link
Author

ghost commented Feb 6, 2016

🙈 Do you want the issue to stay opened?

@rhukster
Copy link
Member

rhukster commented Feb 6, 2016

did you see @flaviocopes last questions? does clearing the cache fix it for you? If so we probably need to add some logic to clear the cache when creating only a folder because the current 'default' logic is looking for page timestamps.

@ghost
Copy link
Author

ghost commented Feb 6, 2016

Sorry! Yes it does so I wrote the emoji 😉

@rhukster
Copy link
Member

rhukster commented Feb 6, 2016

We'll keep it open because it does require a fix still to clear the cache automatically when a folder is added.

@ghost
Copy link
Author

ghost commented Feb 12, 2016

Fixed 😀

@flaviocopes
Copy link
Contributor

👍

@ghost
Copy link
Author

ghost commented Feb 17, 2016

One folder name should have a "ä" in it. Thoughts?

@flaviocopes
Copy link
Contributor

As per our slug field rules, a folder name currently cannot contain characters other than a-z, A-Z or numbers.

@ghost
Copy link
Author

ghost commented Feb 17, 2016

Maybe an exception for a folder without a .md file?

@rhukster
Copy link
Member

A slug is a standard, and should not have exceptions: https://en.wikipedia.org/wiki/Semantic_URL

@ghost
Copy link
Author

ghost commented Feb 17, 2016

Yes the slug should have "ae" in it as it is.
I meant the displayed name in the navigation.

@rhukster
Copy link
Member

At that point you would need to create a page .md file and set a menu: whatever item in the frontmatter.

@ghost
Copy link
Author

ghost commented Feb 17, 2016

Okay. Or change "ae" to "ä" without admin, the scenario in Gantry is to have a non-clickable menu item like @mahagr wrote. My idea is to do it user friendly in admin.

@ghost
Copy link
Author

ghost commented Feb 21, 2016

I do not know how to ask. So it is impossible that an empty folder has for example "ä" in the navigation and "ae" in the URL?

@ghost
Copy link
Author

ghost commented Feb 22, 2016

Everything works with an empty folder except that in the navigation "Einsaetze" has to be "Einsätze".

bildschirmfoto 2016-02-22 um 18 03 39

@rhukster
Copy link
Member

So i'm still a bit confused. You want the folder to be called Einsätze, but then it needs to be set as a route of einsaetze so it's a valid slug. So it should still be displayed as Einsätze in the menu however?

@ghost
Copy link
Author

ghost commented Feb 22, 2016

Sorry for the confusion!

  • The folder has no .md file so in Gantry the menu item links to no page
  • The menu item has to be "Einsätze"
  • The slug has to be "einsaetze"

@rhukster
Copy link
Member

No promises, but i'll take a look again.

@rhukster rhukster reopened this Feb 22, 2016
@ghost
Copy link
Author

ghost commented Feb 22, 2016

Thank you 😀

@mahagr
Copy link
Member

mahagr commented Feb 23, 2016

I think we need to have a way to return $page->isPage() === false even if md file is in there. It would be benefitical to have some page type like folder.md for this, not only for having placeholders in menu, but also to define default page type etc inside of the folder. For example you may have authors folder with only authors in it. In that case you may also want to specify in admin that all pages inside that folder defaults to author.md page type.

@ghost
Copy link
Author

ghost commented Feb 26, 2016

Sounds good 😉

@nsteinmetz
Copy link

Hi,

Let me know if I should open a new issue but I have 3 questions:

  • Do we speak there about the item "Add folder" in the admin panel ? If yes, with 1.0.10, I still have the cache issue, normal ? I precise I created the folder from the admin panel and it didn't show up immediately after creation.
  • What the use cases about folders ? Are folders made to have non clickable item in a menu and no content ? It's what I expect in fact
  • If we could indeed have a way to define "labels" for the folder as you suggested with a folder.md file, it would be awesome :)

Thanks!

@flaviocopes
Copy link
Contributor

The latest published release does not include the cache fix yet.

The use case is that, yes, to have a more structured menu.

@flaviocopes
Copy link
Contributor

Closing as the OP feature is merged in develop

@nsteinmetz
Copy link

Hi,

Using 1.1rc3, I'm not sure it's merged within. Could you confirm ?

btw, is there a doc about new features for 1.1 which we can read somewhere ?

If I add a page within a folder, it's not considered as visible ?

Let me know if I should open a new issue for this.

Thanks,
Nicolas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants