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

Cf customizations #1

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Cf customizations #1

wants to merge 17 commits into from

Conversation

ajhaupt7
Copy link

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 the StaticElController 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

@ajhaupt7 ajhaupt7 requested a review from adlio January 30, 2018 00:45
Copy link

@adlio adlio left a 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants