Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing Plugin with linkit_registerElementTypes and linkit_getElementData #45

Closed
crookedneighbor opened this issue Jul 12, 2016 · 4 comments

Comments

@crookedneighbor
Copy link

crookedneighbor commented Jul 12, 2016

I'm having trouble understanding how to use the linkit_getElementData hook. Do you have an example plugin that uses it?

Specifically, I'm having trouble with the myPlugin_myElements bit in $myElement = craft()->myPlugin_myElements->getMyElementById($id);. Is myPlugin_myElements supposed to be my plugin's name? In that case, should I be implementing my own public getMyElementById method? Or how does it work? I keep running into Exceptions when I try to use it.

@crookedneighbor crookedneighbor changed the title Writing Plugin with linkit_registerElementTypes Writing Plugin with linkit_registerElementTypes and linkit_getElementData Jul 12, 2016
@crookedneighbor
Copy link
Author

@joshangell do you have an example repo that shows how to make a plugin?

@Moorst
Copy link

Moorst commented Dec 11, 2017

Did you ever get anywhere with this? I'm hoping to add the https://venticalendar.io/ event type (Venti_Event) to Link It and not sure how to do so.

@crookedneighbor
Copy link
Author

Never got anywhere.

@Moorst
Copy link

Moorst commented Dec 11, 2017

This ended up working for me;
$myElement = craft()->elements->getElementById($id);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants