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

Fold/Unfold one at the time #87

Open
hcgreier opened this issue Mar 11, 2024 · 2 comments
Open

Fold/Unfold one at the time #87

hcgreier opened this issue Mar 11, 2024 · 2 comments

Comments

@hcgreier
Copy link

Hi,

Great plugin!
I use it in the sidebar, having 16 main categories in a list, which all have sub-categories (links).

Is it possible to have only ONE category unfolded at the time? Say, C is open, and you click on E, then C should close.

thx a lot,
hc

--

@hcgreier hcgreier changed the title Fold one at the time Fold/Unfold one at the time Mar 11, 2024
@fiwswe
Copy link
Contributor

fiwswe commented Mar 11, 2024

No sure exactly what you mean? If you have multiple blocks of

++++title|
…
++++

then they are independent. Opening or closing one does not affect the others. So the answer to your question is probably: no, that is not possible.

Just speculating on such a feature here:

  • You would need to be able to group the folded blocks into interdependent groups since it would be strange to allow only one fold to be open at a time in the general case. That would require some sort of optional label to be added to the folded blocks which would require a change in the syntax used to define folds. Then the code handling the folds would need to change significantly because at the moment the code is not aware of other folds on the same page.

  • Or you would need to group the folds into some sort of list element that handles the logic of allowing only one fold to be open at a time. Again a significant modification to the syntax and the code of the plugin.

@fiwswe
Copy link
Contributor

fiwswe commented Mar 11, 2024

It might be easier to find or create a specialised plugin for menu-like structures which does this sort of thing. Something like AcMenu Plugin (which I have never used and of which I don't know if it solves this particular problem).

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

No branches or pull requests

2 participants