Hello all, I am wanting to create a custom Umbraco macro parameter type that lists all document type, but excludes some document types that the editor should never select, hence the need to create my own custom macro parameter type.
As I am making this part of a package I ideally dont want to add and remove DB entries for the install & uninstall of this package. Is there a smart way of just by registering the class that I need to inherit that Umbraco will automagically register it and add it to the Umbraco back office without having to add items to the DB for this?
@Dirk is there any places in the core codebase I can look to see where other items get automatically registered on App Startup of Umbraco, so I can try and hack this in with a pull request.
@Ismael: you might be hit by the current hot temperatures. Haven't seen such a thing (yet)
@Warren: Check you log file in App_data folder, should have some entries on classes which are discovered during startup (Eg. not found handlers, IAction's, maybe even base/rest extensions which you can declare using attributes).
Thanks Dirk I may look at how Tim G implemented the Base/Rest extensions with Data Attributes, as I can read his code as opposed to some of the more hard core Umbraco core devs :)
Custom Macro Parameter Type - without DB entry?
Hello all,
I am wanting to create a custom Umbraco macro parameter type that lists all document type, but excludes some document types that the editor should never select, hence the need to create my own custom macro parameter type.
I have seen the documentation & Richard S' blog post on the topiuc but both discuss about adding a DB entry to a table for it to be registered.
https://github.com/umbraco/Umbraco4Docs/blob/master/Documentation/Extending-Umbraco/Macro-Parameter-Editors/index.md
http://www.richardsoeteman.net/2010/01/04/CreateACustomMacroParameterType.aspx
As I am making this part of a package I ideally dont want to add and remove DB entries for the install & uninstall of this package. Is there a smart way of just by registering the class that I need to inherit that Umbraco will automagically register it and add it to the Umbraco back office without having to add items to the DB for this?
Love to hear what you think.
Cheers,
Warren :)
Warren,
I haven't seen anything different when looking to create custom macro parameters but I may be wrong.
Regards
Ismail
Go on warren, i can see a pull request/feature request coming.
And what ismael says, you can't without adding a db entry.
/Dirk
@Dirk is there any places in the core codebase I can look to see where other items get automatically registered on App Startup of Umbraco, so I can try and hack this in with a pull request.
Cheers,
Warren :)
That said was'nt there a gui for doing this kind of stuff or am I imaging things?
Ismail
@Ismael: you might be hit by the current hot temperatures. Haven't seen such a thing (yet)
@Warren: Check you log file in App_data folder, should have some entries on classes which are discovered during startup (Eg. not found handlers, IAction's, maybe even base/rest extensions which you can declare using attributes).
/Dirk
Thanks Dirk I may look at how Tim G implemented the Base/Rest extensions with Data Attributes, as I can read his
code as opposed to some of the more hard core Umbraco core devs :)
Cheers,
Warren :)
I smell a TypeFinder patch coming in...
is working on a reply...