Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.3 fully supports PHP 7. Get it now!

Is there a way for a plugin to override controller view?

TiGRTiGR
edited August 2011 in Development
Well, I'm writing a set of auth plugins (instead of existing ones, since these are much of copy/paste which is wrong for maintenance and architectural issues). And now I've met that Entry controller Connect method does not support services that do not provide user email. The simplest fix is to tweak something in entry/connect.php view. But it seems that application views are not overridable by plugins. Is that correct? Could this be changed?

Best Answer

  • LincLinc Vanilla's Bard (and Lead Developer) Detroit Vanilla Staff
    Answer ✓
    The view should be overridable on the fly. Use $this->GetView('view.php') in the plugin to get the string to set as the view name.

Answers

  • Also, I've tried creating new view with unique name ('connectnoemail'), and change controller view on the fly, and this still does not work - Vanilla still cannot find it.
  • LincLinc Vanilla's Bard (and Lead Developer) Detroit Vanilla Staff
    Answer ✓
    The view should be overridable on the fly. Use $this->GetView('view.php') in the plugin to get the string to set as the view name.
Sign In or Register to comment.