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: Map File/Multifile link list items to some field from returned pages #110

Closed
frankreporting opened this issue Sep 27, 2022 · 7 comments · Fixed by #118
Closed
Assignees
Labels
enhancement New feature or request fileClass related to fileClass management settings related to field management in settings types related to field types

Comments

@frankreporting
Copy link

First, this plugin is super handy, and already one that I use every day!

I have a multifile link field that gives me a list of folder notes, based on a tag #area. So I have:

dv.pages("#area")

Which returns a list like...

20 Personal
21 Automobile
22 etc..." 

It would be great if we could access the page object and map it, like we're rendering with the dataviewjs dv.table...map() or dv.list...map(). In my case, this would allow me to render the list using the aliases, so my dropdown list looks more like this:

🗃.Personal
🗃.Personal.Automobile
🗃.Personal.etc.

Nitpicky use case, I know, but I imagine others might find use in being able to render the list with something other than the filename.

@mdelobelle
Copy link
Owner

this is a nice idea indeed.
If we replace the link with a new string thanks to some kind of template, the plugin won't be able to identify the "current values" when you'll try to update the list.
What I would suggest is that the "custom rendering" goes into the alias of the link
So in your example it would translate into:

[[20 Personal|🗃.Personal]] which would be licely displayed in live preview and reading mode to 🗃.Personal

This way the link still exist and the plugin is able to find the current values in the field

WDYT?

@mdelobelle mdelobelle self-assigned this Oct 1, 2022
@mdelobelle mdelobelle added enhancement New feature or request fileClass related to fileClass management settings related to field management in settings types related to field types labels Oct 1, 2022
@frankreporting
Copy link
Author

What I would suggest is that the "custom rendering" goes into the alias of the link

So in your example it would translate into:

[[20 Personal|🗃.Personal]] which would be licely displayed in live preview and reading mode to 🗃.Personal

This way the link still exist and the plugin is able to find the current values in the field

WDYT?

I like! Does that mean the pop-up chooser menu would also render the list of values using their aliases? Or would the alias only appear in the note itself?

@mdelobelle mdelobelle added this to the next release milestone Oct 4, 2022
@mdelobelle
Copy link
Owner

I think would be the alias in case a custom rendering is set

@mdelobelle
Copy link
Owner

something like that ?

image

image

image

@frankreporting
Copy link
Author

Yes, that looks amazing!

@frankreporting
Copy link
Author

Thank you for making that update! That's really slick! One minor thing: the autocomplete doesn't seem to work with the chosen alias, so you still have to search by original filename regardless of your chosen alias. Is that something that could be implemented in a future update? Would it help to have it as a separate feature request?

Thanks again for being responsive. Do you have a donation button or "buy me a coffee" set up? Would love to support your work!

@mdelobelle
Copy link
Owner

Do you have a donation button

Not at the moment 😇, I do this purely for fun :) (and also for my personal needs)

the autocomplete doesn't seem to work with the chosen alias

This is now available in 0.2.10

@mdelobelle mdelobelle removed this from the next release milestone Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fileClass related to fileClass management settings related to field management in settings types related to field types
Projects
None yet
2 participants