Skip to content

WP plugin shouldn't override home route #86

@anuveyatsu

Description

@anuveyatsu

Currently, if I use WP plugin, it completely replaces implementation from core controller. It is also not possible to combine it with theme controller.

The current code: https://github.com/datopian/frontend-v2/blob/master/plugins/wp/index.js#L14-L32

Desired flow:

Plugin --> Theme --> Core

so that devs can implement any solution in their theme.

Acceptance criteria

  • WP plugin doesn't override home route but adds posts into response variables (res.locals) so that it can be used in the views
  • WP plugin controller is called before theme controller

Tasks

  • Analysis
  • TODO

Analysis

Right now the execution flow of the controller is Theme--> Plugin --> Core. We can add the middleware route controller for WP task on wp plugin and pass the variable using res.locals in between the controller on this flow Plugin --> Theme --> Core

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions