Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [sources]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

How get entries by sources in a frontend fieldlayout?

I have multiple entries fields that I want to use in the front-end. In the field settings I'll set up a sections source for each field. On the frontend I want a dropdown select box with all the ...
Maarten Heideman's user avatar
1 vote
1 answer

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 ...
JSICS's user avatar
  • 21
1 vote
0 answers

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; ...
Millions's user avatar
1 vote
1 answer

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 ...
yu xia's user avatar
  • 397
3 votes
2 answers

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 ...
Stephen's user avatar
  • 685
1 vote
1 answer

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 ...
greed's user avatar
  • 113
1 vote
0 answers

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 ...
Critical Mash's user avatar
0 votes
1 answer

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 ...
DZIEY3's user avatar
  • 35
2 votes
1 answer

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' ...
Iain Henderson's user avatar
1 vote
0 answers

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' => [...
Tim Everts's user avatar
2 votes
1 answer

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&...
Esseb's user avatar
  • 151
10 votes
2 answers

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": [ { ...
Fred Carlsen's user avatar
  • 2,997
2 votes
1 answer

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 ...
Ben Parizek's user avatar
  • 13.5k
9 votes
0 answers

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 ...
kcolls's user avatar
  • 608
1 vote
0 answers

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 =...
phaetons's user avatar
  • 705
2 votes
2 answers

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 ...
Lindsey D's user avatar
  • 24k
2 votes
3 answers

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? ...
Tchick's user avatar
  • 105
3 votes
1 answer

Can custom entry sources have their own URLs?

I can go to, 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 ...
Mike Pepper's user avatar
  • 4,391
5 votes
1 answer

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 ...
Jason McCallister's user avatar