3

I'm guessing you may have found an answer to this, but have you seen the download assets plugin? It puts a download button next to every asset on an edit page that links to the asset's url.


3

Try using {site.handle} instead of {{currentSite.handle}} and it should work ok.


2

Assuming you are on a front end entry form editing an entry, there are a few steps to this. First get all assets a user can choose from: {% set allImages = myAssetQuery.all() %} Next, get the ids of already chosen assets: {% set alreadyChosenImages = entry.businessStandardImages.ids() %} Loop over all images, check the ones already selected: {% for image ...


2

Rather than throwing an exception when the filesize is too large, you should be adding a validation error, which should be handled correctly. use craft\base\Model; use craft\elements\Asset; use craft\events\DefineRulesEvent; use craft\helpers\ArrayHelper; use yii\base\Event; Event::on( Asset::class, Model::EVENT_DEFINE_RULES, function(...


1

You may need to write some kind of utility code to assist you in this task. I would use a console command for this that: loops over the entries in the "Staff Articles" section loops over the assets selected in the "Staff Photos" field change their volume and folderId save the assets This may not be the best solution but should work.


1

The documentation on this is a bit scattered about, it took me a while to get the whole picture as well. You need multiple pieces of information: The documentation on querying assets only mentions craft.assets() as a way to query entries, which you would use to query assets independently of an entry. Meanwhile, you can find the documentation on how to query ...


1

1.) Have you set the feed to update existing entries? 2.) Try to url-encode the URL in the JSON, it contains special chars like spaces.


1

So, I found the problem / solution myself: I have 2 file volumes in my Craft installation (documents, images) The asset field I am trying to fill via FeedMe is in its configuration limited to the "images" file volume, but the default location for uploads is (erroneously) configured in the documents share. In this case, FeedMe is determining the ...


1

I don't know if you're still facing this issue but it's something I'm working on right now! Basically my solution was to create a short program to parse through the Element Exporter json and to change anything that was an Asset ID to that asset's url (which Feed Me accepts). public function modifyExport(array $element): array { $result = []; ...


Only top voted, non community-wiki answers of a minimum length are eligible