Skip to content

Instantly share code, notes, and snippets.

@chucktrukk
Created July 22, 2011 19:48
Show Gist options
  • Save chucktrukk/1100267 to your computer and use it in GitHub Desktop.
Save chucktrukk/1100267 to your computer and use it in GitHub Desktop.
revo updates

Allow multiple templates to have the same name

  1. Remove index on template name via: ALTER TABLE modx3_site_templates DROP INDEX templatename
  2. comment out 25-30 in /core/model/modx/processors/element/template/create.php
  3. comment out 40-46 in /core/model/modx/processors/element/template/update.php
@chucktrukk
Copy link
Author

[1:20pm] chucktrukk: Is there any plans to allow us to add custom validation to TVs?

[2:30pm] splittingred: chucktrukk: validation? you can do PHP ones through a plugin on the OnDocFormSave event
[2:30pm] splittingred: as for JS validation, well, same deal, a plugin on the OnDocFormPrerender event

[2:39pm] chucktrukk: thanks shaun. I cant cancel the save via the OnDocFormSave event can i?

[3:35pm] opengeek: you can programmatically add validation rules to the resource object in OnBeforeDocFormSave I believe
[3:36pm] opengeek: and yes, you can cancel save by returning a message
[3:38pm] opengeek: $resource->addValidationRule($field, $name, $type, $rule, $parameters)

@chucktrukk
Copy link
Author

  • migx should set document dirty
  • ok. all items should set document dirty. or live save (if versioned)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment