Git Product home page Git Product logo

Comments (11)

Mesuva avatar Mesuva commented on June 1, 2024

I'll take a look at this, but if you're simply needing the attribute, rather than worrying to retain the data, I'd suggest using this instead: https://github.com/Mesuva/multiple_page_selector_attribute

(this particular one was built ages ago, so is really very 'legacy' in its approach)

from multi_page_selector_attribute.

Mesuva avatar Mesuva commented on June 1, 2024

Try this fix here:
5e9a239

The ability to filter the page list/tree by page type is a lot harder to solve though, as V9 has effectively removed that from being an easy filter to apply.

from multi_page_selector_attribute.

georgertl avatar georgertl commented on June 1, 2024

Hey, thank you very much for your fast answer! I tried this fix, but it will not save as expected.
I love your attribute and i did not find any of this on the whole internet. I need this attribute for an project, which is very important for me :) I know this is a bit tricky, but is there any possibility to make the functionality like before with the restriction to use in v9? :)

from multi_page_selector_attribute.

Mesuva avatar Mesuva commented on June 1, 2024

I'm finding it is saving with that fix in place, but only the top level of pages. It's further down the tree that aren't being re-checked. It is actually saving down when they are checked, as you can see it try to initialise the tree with the page IDs, but they just don't get checked.

I'm looking for an answer for that now, but I actually think it's Concrete's tree script that is buggy.
Displaying a tree this way with multiple selection isn't used anywhere in the core I believe, and that's why I don't think it's working correctly.

V9 changed what is available sitemap widget wise, and that includes the ability to have a page selector that filters by page type. And that also applies to the individual page selector widget, not just this tree based one.

I'd really encourage you to use https://github.com/Mesuva/multiple_page_selector_attribute instead if you can, that at least works fully.

I'm a bit stuck on how to solve both the above, as one is a core bug, and the other is lack of functionality in V9 - the latter would require me to build some other way to select pages, that could be very complex to achieve.

from multi_page_selector_attribute.

georgertl avatar georgertl commented on June 1, 2024

Hey Mesuva, thank you so much for your answer! I see the problem!
The new attribute from you is very useful "https://github.com/Mesuva/multiple_page_selector_attribute". But you can not adjust any restricitions. And this is the problem, I need to adjust, that the user can only choose either a site below a site or choose only a certain pagetype.
You also wrote, that it is availible to use a attribute, which is new, that you can choose a page selector that filters by page type. But i do not find it, where is it based? Or can I download it anywhere?

from multi_page_selector_attribute.

Mesuva avatar Mesuva commented on June 1, 2024

@georgertl There are only two versions of this attribute, this older one, and the newer one you've linked.

I'm actually quite stuck on how to solve this in V9, for both attribute packages.

  • In this legacy one the multiple page selector no longer appears to allow filtering by page type, or even by section of the sitemap (on top of the issue of it not checking all pages correctly)
  • in the V8/V9 one, it uses a list of page selector widgets that pop up a sitemap to select a page. Whilst this one then allows you to change the order of the pages, and more easily find a page, the widget also doesn't provide any options to only offer pages of a particular type, or a section of the sitemap.

It's really a case that V9 removed a bunch of functionality, and I don't have a way to work around that.
I can't see a way forward without building a whole new sitemap selector, or some other page selector like a dropdown. Such new components could take a large number of hours to get right to be honest.

from multi_page_selector_attribute.

georgertl avatar georgertl commented on June 1, 2024

Hello Mesuva, thank you very much for the answer.
But is it possible to make two attributes, one for singe page selection and one for multiple page selection?
This attributes, can be a template of the page selector attribute.
There you can hardcode for example the restriction to show only pages below a CollectionID oder PageType.
In this attribute you have different methods for example: selectFromSitemap() or selectMultipleFromSitemap()
https://documentation.concretecms.org/api/9.1.1/Concrete/Core/Form/Service/Widget/PageSelector.html
Do you know what I mean? This could save my problems :) But I am not able to program this :)
George

from multi_page_selector_attribute.

Mesuva avatar Mesuva commented on June 1, 2024

I know what you are asking, but on those functions you've linked to, the parameters $startingPoint and $filters no longer do anything. They did in previous versions, but not in V9.

I've spent time looking at ways either this attribute, or the newer one, could be adapted to either let you select from a section of the sitemap, or from a filtered list of pages. In both cases the limitation is what is available in V9.

from multi_page_selector_attribute.

georgertl avatar georgertl commented on June 1, 2024

Hey, oh shit! Do you believe this will work in furhter updates? BTW: Thank you so much for your answers!

from multi_page_selector_attribute.

Mesuva avatar Mesuva commented on June 1, 2024

Probably not, at least without it being brought to the attention of the core developers, and then them having a good reason to fix it. I don't believe those featured are used in the core directly.

It all comes back to the fact the page selector dialog and the page selector tree were re-built in V9.

from multi_page_selector_attribute.

georgertl avatar georgertl commented on June 1, 2024

Hey, ok thanks for the message. I will try to get an workaround. Like to hidden menuitems with css or anything. If you have ideas, please let me know :)

from multi_page_selector_attribute.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.