Questions tagged [elementtype]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
15
votes
1answer
3k views

What is getContent() / the ContentModel, and how do I use it to get and set custom field values?

If I want to retrieve content on an element, should I be calling $entry->$fieldHandle or $entry->getContent()->$fieldHandle? What’s the difference? Likewise, if I’m setting new content on an ...
7
votes
1answer
1k views

Is it possible to use the ElementType Modal UI for a custom Field Type Plugin?

So I'm writing a plugin to try and create a relationship between two entry sections that is a two way street (Many to Many). I would love to co-opt the UI and functionality of the ElementType modal ...
10
votes
1answer
321 views

Best way to implement my own statuses on my custom element type?

I'm working on a plugin with its own element type, I'm trying to add custom statuses to the element type. What is the best way to proceed? I have hasStatuses set to true and getStatuses is where I ...
9
votes
2answers
418 views

How to integrate custom statuses in a workflow style custom element type?

I made a lot of progress on my custom element type from this post and with the help of @selvinortiz: Best way to implement my own statuses on my custom element type? I know have custom statuses that ...
5
votes
1answer
560 views

How can you return elements between two values?

I my be in a bit of a "wood for the trees" situation but how is it possible to return elements based on a custom field being between two supplied values. For example returning users based on a number ...
7
votes
2answers
345 views

How do you add support to manage content in multiple languages in a plugin with a custom Element Type?

We have a plugin with custom Element Types that allows a user to create a field layout using custom fields. We understand how to setup a localized site and add translation files. This question is ...
6
votes
1answer
447 views

Display thumbnail using defineTableAttributes for a custom Element Type

Hi, I'm new to Craft and VERY new to plugin development. I'd like to display a thumbnail image in my table list view and thought it would be possible to accomplish using a new Custom Element Type. ...
6
votes
1answer
634 views

Allow anonymous submission on a custom element type?

I have a custom element type that I want to allow anonymous submission from the front-end. I have a solid concept on how the form data is passed but I seem to be missing something. I have the ...
4
votes
1answer
160 views

Split-style button for “New” custom element

I've got a plugin with a custom element. It evolved based on the basics laid out in the P&T Events sample plugin. On my element's index page, there's a big button to create a "New Element". When ...
1
vote
0answers
83 views

Element type vs. Field type - or: Element type without database storage?

I have already searched for information on this topic but I did not find much. I hope I did not overlook something. My problem is the following: I want to try to write a plugin that lists entries ...
3
votes
1answer
65 views

Detect currently selected source of custom elements

I have a split-style + New Element button for my custom element type. Thanks to this previous thread, the right-side dropdown menu is working perfectly! My question now is, how do I get the + New ...