Questions tagged [sources]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
25 views

How to limit sources for Entries field set up via migration

I'm seeting up all of my project's fields using migrations. This works really well, but I haven't been able to figure out how to limit the sources (sections) for an entry selection field. I've based ...
1
vote
0answers
64 views

How to add sources for Entries

The documentation indicates it is possible to add sources for entries like this: use craft\base\Element; use craft\elements\Entry; use craft\events\RegisterElementSourcesEvent; use yii\base\Event; ...
1
vote
1answer
91 views

How can I create a new asset source?

Now I have a "gallery image" field which allows users to upload multiple images, and some "single-upload image field" in matrix block. For "single-upload image field", I want to force users to ...
1
vote
2answers
336 views

How to set different file size upload limits for different Asset Sources

How can I set file size upload limits on a per-Asset Source basis? I can only see how to set a global maxUploadFileSize in the general config. I'm sure I must be missing something obvious though, as ...
1
vote
1answer
92 views

Custom ElementType empty getSource criteria?

I'm trying to add a source on a custom element type that shows entries with an empty assigned_user_id field. This criteria is not honored and returns the same results as the "All Entries" source. Is ...
1
vote
0answers
110 views

Redactor inserts reference tags into IMG when using image transforms, but tag not being processed by parseRefs

Been working with Craft for about a year, but today for the first time I had to modify the Redactor config to place images inside a body field. I added 'image' to my buttons array and everything ...
0
votes
1answer
68 views

How to display all fields for an entry within an entry field type?

I've got a portfolio site I'm building, and on each project's page I'm wanting to show a list of people who worked that project. I created a channel section called "work" with an entry field type ...
2
votes
1answer
25 views

Shouldn't the asset “View source” privilege limit access to an asset source in the selection modal?

I've created an asset source: 'restricted uploads' and a user: 'Jim', who is a member of the 'staff' User Group. Neither 'Jim' or the 'staff' group have any privileges for the 'restricted uploads' ...
1
vote
0answers
124 views

Table attributes not customisable for nested entry sources [closed]

Using a plugin, I have added some nested entry sources to some of the default section entry sources in my site. For example: 'section:6' => [ 'label' => 'News', ... 'nested' => [...
2
votes
1answer
302 views

Using search criteria in modifyEntrySources plugin

I have articles with a multi-select named theme. This works fine in a template: {% set entries = craft.entries.section('article').search('theme:themeFoobar') %} <p>{{ entries | length }}</p&...
10
votes
2answers
2k views

Correct IAM settings for Amazon S3 bucket

I'm trying to setup an Asset source on S3, but i'm having trouble getting the correct permissions. This is my current policy file: { "Version": "2012-10-17", "Statement": [ { ...
2
votes
1answer
77 views

How do I setup my Element Types Sources for deep linking?

In the Entries tab in the Control Panel, I see a list of Sources on the left hand side: All Entries Singles News When I click on each of these sources the page filters the appropriate results in the ...
9
votes
0answers
664 views

How do I upload images programmatically?

I'm working on a plugin that creates auto crops of a selected image, but I am unsure of the proper steps to create and upload an image programatically. I am hoping that Local asset sources and Remote ...
1
vote
0answers
61 views

asset sourcetype getLocalCopy() not working?

I need to use getLocalCopy from LocalAssetSourceType // Get asset source $source = $asset->getSource(); // Get asset source type $sourceType = $source->getSourceType(); // Get asset file $file =...
2
votes
2answers
497 views

Bulk moving asset folders, from one source to another

I'm moving all of my assets from a local folder to Amazon S3. I've got my S3 source all set up, and I've been migrating folders over to it by dragging & dropping. The problem is, I have thousands ...
2
votes
3answers
355 views

Multiple sources on category field type - possible?

We're trying to setup a category field type to allow the selection of 1 category but from multiple category sources. Is there a simple way to achieve this without writing a custom plugin / fieldtype? ...
3
votes
1answer
117 views

Can custom entry sources have their own URLs?

I can go to http://example.com/admin/entries/sectionHandle, and the Entries list has that source selected, but I can't find a way to do that with sources added through modifyEntrySources. I've got ...
5
votes
1answer
572 views

Use a custom Element Type without sources?

I want to create a custom plugin (element type) that does not allow custom fields. Therefore, when digging through existing element types, do I really need to have the getSources method? If this is ...