We had a need for a new content type -- geoposition -- which uses Google Maps to allow a content editor to select a point on a map which a document relates to.
I’ve done it by hacking 2 core files, but I’d like to put it into a plugin so that it can be uploaded to the repository.
Is there any way of doing this using the current architecture? Can you hack the core files on the fly using system events?
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK
you can create a plugin that hides the standard content fields via javascript (there is atleast one available in these forums). You could make it check that is some certain template selected for example
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Yes and it’s named
HideEditor but there is another one newer called
Customize Manager Fields which is more powerful and more complex also...
It should do the trick for you
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
It’s not quite that what I want to do -- I am adding a new option to the ’input types’ dropdown of creating/editing a template variable. So you can create a new type of input.
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK
-
☆ A M B ☆
- 24,524 Posts
No, you’ll need to hack the relevant manager files to do what you want. At least with this codebase.
It sure is another story altogether... I hope we’ll have this into the next gen
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
Quote from: sottwell at Mar 21, 2007, 04:03 AM
No, you’ll need to hack the relevant manager files to do what you want. At least with this codebase.
Once it’s all tested, would you be interested in a copy of the diffs to put into the distribution?
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK
-
☆ A M B ☆
- 24,524 Posts
The document-level "custom content types" that you can add to in the Configuration has to do with the actual MIME types a document can have, such as text/html, etc. It is reflected in the "type" dropdown for each document. They are used to create xml documents for news feeds, or to use a document as a css file, which allows for conditional styling via snippets and/or chunks.
What we’re talking about here is the "input" and "output widget" types available for TVs, such as the "imgage" input type, which causes the TV to display a text field along with a button to allow use of the resource manager for selecting or uploading images, and the "image" widget that formats the value of the TV as an image tag in the final output of the document.