Multiple page selectors in block
PermalinkI'm trying to make a block where different pages could be selected through the sitemap of Concrete5.
The helper form/page_selector gives us the opportunity to select a page in the sitemap.
But if multiple selectors are placed on in the block, the page selector doens't seem to work. After some problem seeking, I found out that the javascript function to load the page into the block is overwritten as soon as another page selector is added.
The function name is: ccm_selectSitemapNode.
Has anybody a solution for this problem?
Thank you!

I'm kind of waiting for it....
Should I also add this question/feature to the service partner area?
Step 1.
Override /concrete/helpers/form/page_selector.php by copying it to /helpers/form/page_selector.php. [b]Warning:[/b] due to an unrelated bug you will [b]also[/b] have to rename the original. This isn't how the Concrete5 overriding usually works, but with this particular file it turns out to be necessary.
Step 2.
Edit the copy and change this line:
var pari = $(ccmActivePageField).parent().find(\'[name=' . $fieldName . ']\');
to look like this:
var pari = $(ccmActivePageField).parent().find(\'input[type="hidden"]\');
http://www.concrete5.org/marketplace/addons/designer-content...
I'm hoping to submit those fixes as a patch for the next version of the core system, but who knows when that will be...
Thanks for the replies.
I solved the problem by creating a new pageselector popup and passing the pageID's to hidden fields.
This is much nicer and easier.
Thanks again!
Corretje