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

Create an Embedded Asset by Passing a Url via template Code #266

Open
brianrivet-tilt opened this issue Jul 14, 2024 · 0 comments
Open

Create an Embedded Asset by Passing a Url via template Code #266

brianrivet-tilt opened this issue Jul 14, 2024 · 0 comments

Comments

@brianrivet-tilt
Copy link

What would you like to see added to or changed in Embedded Assets, and why?

Hi,

I don't know if this would be any sort of security hazard or anything like that, but it might be nice to have the ability to pass a url via template code into the plugin and have the plugin attempt to create a new embedded asset from the url and return either the id of the newly created asset if successful (or the asset itself for that matter) or 0 (or some other error code) if the attempt to create the asset fails for some reason.

Here's a use case, you have an array of items, some of which are entries etc. in the system and some are external urls, but you want to display them as say cards with an image, title and description. For the entries from craft that is easy because the element can have those fields on it, but for the remote urls, you don't, but if you load them as embedded assets, then you most likely do as long as they are defined at the source. The problem is you have to create the embedded assets for those urls first, which would be recreating work from where you created the list in the first place (for example, creating a navigation list that has a mix of entries and remote urls but no extra fields for things like an image, description, etc.)

Thanks!

@brianrivet-tilt brianrivet-tilt changed the title Create an Ebeeded Asset by Passing a Url via template Code Create an Embedded Asset by Passing a Url via template Code Jul 14, 2024
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

1 participant