forked from argnist/StaticSaver
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cf customizations #1
Open
ajhaupt7
wants to merge
17
commits into
master
Choose a base branch
from
cf_customizations
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To avoid confusion with old, unmaintained extra
As we will not support this going forward
* Adjust names for conciseness * Adds base element path setting * Adds element media source setting (rather than setting for individual element types) * Removes template variable settings
* DRY it up, lots of unnecessary replication in here previously * Update for our new system settings
adlio
approved these changes
Mar 7, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great at the code level. Haven't tested the real-world working thing yet. Moving card to QA.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TRELLO CARD
https://trello.com/c/L2jAaF0A/3488-cf-create-a-way-for-elements-templates-chunks-snippets-and-plugins-to-opt-in-to-be-edited-exclusively-via-version-controlled-cap
DESCRIPTION
As you can see, this is a fork of the unmaintained extra, StaticSaver. I changed the name to StaticElController to reflect what it does more accurately and to indicate its future direction as separate from the original. This effectively uses the original efforts of StaticSaver as a base, but builds on and alters its functionality to meet our needs.
This version adds new system settings, adds JS to lock editing of static files, and writes the README (which should give you a good overview of what the Extra actually accomplishes).
TESTING
I've set up the new MODx version control workflow on the Culture Foundry website. This extra is installed on Dev and Prod, and all elements have been dumped as a base. To test:
Create a new chunk in production with some basic html content.
Add the chunk somewhere in this "playground"
StaticElController
template I added (/manager/?a=element/template/update&id=25
)You should see the chunk content appearing where you added it on this page:
/staticelcontroller-test?preview=true
(I set up a hidden from menus resource to use theStaticElController
template)Mark the chunk as static, note the path and media source that are added automatically (it should match the paths of the corresponding/existing elements from dumping chunks)
Repeat the previous 4 steps on dev
cfdb culturefoundry --fresh
git pull origin master
Edit the new chunk you created earlier locally in your text editor
Commit and push to master -- you should see the new chunk content appearing on the playground page on dev
bundle exec cap deploy
-- you should now see the new chunk content appearing on the playground page on prod