V8 - Include page / file selector to dynamically created faq entries inside block
Permalink
Does anyone have an example how to include a page / file selector inside the ccm-faq-entry-template? Its something similar to the image_slider I guess but the faq block is set up differently.
This does dynamically add new "entries/slides" with a preset template.
For static text this works fine but would like to have the page / file / image / cke fields available too.
This does dynamically add new "entries/slides" with a preset template.
For static text this works fine but would like to have the page / file / image / cke fields available too.
Anyone who could shine a light on this?
page selector
Image selector
Note that for the image selector to work you will have t load the file manager asset by doing this from your controller:
$ps = \Core::make('helper/form/page_selector'); echo $ps->selectPage('yourPageSelectorIdentifier', $yourPageSelectorExistingValue);
Image selector
$fs = \Core::make('helper/concrete/asset_library'); echo $fs->image(yourUniqueImageSelectorIdentifier', 'yourSelectorInputName', t('A label for your input'), $yourImageSelectorExistingValue);
Note that for the image selector to work you will have t load the file manager asset by doing this from your controller:
$this->requireAsset('core/file-manager');
Actually I am wrong on that last part, you do not need to load the file manager asset, at least in 8.4.4
Attached code (zip) to original post.
It does open the sitemap to select a page.
But the dynamic 'add entry' is the problem and wont pick up the value.
It does open the sitemap to select a page.
But the dynamic 'add entry' is the problem and wont pick up the value.
Any insight on this one?