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

Add getter methods for original and action to the Page object. #2005

Merged
merged 1 commit into from
Jun 8, 2018

Conversation

Hydraner
Copy link
Contributor

@Hydraner Hydraner commented May 2, 2018

First of all, I am pretty new to grav and I'm pretty exited working with it. I come from the Drupal world and I love Grav because it's so similar it its concepts but still lightweight and way better to work with for smaller sites.

So pls give me a hint if I don't do this right here, it's my first contribution!

I started building a Plugin for automatic redirects when changing the folder's name in order to keep SEO ranking. To do that, I need to compare the original version with the current one when Saving a Page. Additionally I found it useful to check for the move action at this point, this way I don't need to compare the objects to see if something changes.

However, the _original property is private and cannot be accessed onAdminSave event.

@rhukster rhukster merged commit ab58cca into getgrav:develop Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants