Get Started         Best Practices         Developer Guide         FAQ        
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Custom AR button action

Paul Sturgess Jul 21, 2015

Hi, is it possible to have a button appear in AR but rather than open a url, perform a custom action?

Should I subclass CraftARTrackingContentImageButton ?


( Agent )
Luis Martinell

Jul 22, 2015

Yes, subclassing the Content class is what you need. You have two options to do this:

1- Create your content programmatically.
2- Set the default class for the “image_button” content type (used for buttons from the content creator) as your own custom class ( This is a static method to which you should pass the content type identifier, and the class for your custom content.

0 rated

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Couldn't find what you were looking for?
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found