I receive an error of:
“The selector field is missing. Please add it to your installed fields or remove it from your blueprint”
I believe installed the folder in the correct place:
My blueprint looks like this:
images:
label: Images
type: selector
mode: multiple
types:
- image
any help would be greatly appreciated
The name of the plugin folder must be the same as the plugin file, in this case “field-selector”.
Thank you, when trying to output the image I get thins error now:
<?php
$filenames = $page->images()->split(',');
if(count($filenames) < 2) $filenames = array_pad($filenames, 2, '');
$files = call_user_func_array(array($page->files(), 'find'), $filenames);
?>
<?php foreach($files as $file): ?>
<figure>
<img src="<?php echo $file->url(); ?>">
</figure>
<?php endforeach ?>
images()
is a native page method, you should either rename your field or use:
$filenames = $page->content()->images()->split(',');
1 Like