velaware Posted January 31, 2014 Report Posted January 31, 2014 Is it possible to send a user to a page within an event listener? I.e.: when someone logs in, your listener on Users.login presents the user with a page before they get to the client portal? Quote
Tyson Posted January 31, 2014 Report Posted January 31, 2014 Yes and no. No, event listeners only receive and pass data, they do not render anything, like page content, so you cannot insert an intermediary step. However, yes, your event listener could redirect the user to some other URL, but then none of the other plugins that tie into that same event listener would ever execute. So it's best to never redirect from an event listener. Quote
velaware Posted January 31, 2014 Author Report Posted January 31, 2014 Yes and no. No, event listeners only receive and pass data, they do not render anything, like page content, so you cannot insert an intermediary step. However, yes, your event listener could redirect the user to some other URL, but then none of the other plugins that tie into that same event listener would ever execute. So it's best to never redirect from an event listener. I realized the flaw in this just now anyways before you posted this, so this just affirms my thoughts, lol. What I need to do anyways is hook into where invoices are displayed so if that's possible, awesome. If not then I'll need to create client widgets for it. Quote
Cody Posted February 5, 2014 Report Posted February 5, 2014 I realized the flaw in this just now anyways before you posted this, so this just affirms my thoughts, lol. What I need to do anyways is hook into where invoices are displayed so if that's possible, awesome. If not then I'll need to create client widgets for it. I'd suggest posting a feature request. Obviously we'd need much more information on what it is you're trying to do here so we can look into where the event would need to located and what it would allow. Also, we have plans to introduce an event to set html (including javascript) into the structure of each page. This would allow a plugin to modify the DOM using javascript and do all kinds of crazy things. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.