 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
Can i include a custom datatype as a macro parameter? I am working on my weather macro/xslt and it takes a parameter for Farenhiet or Celcius -- it acutally needs to be an F or C, so i thought i would make a datatype of radial group with those two options...easy enough [i think] i went to the macro and wanted to change the parmeter from text to my custom data type, but it does not show up on the dropdown list of types... is this something that can or cannot be done? Let me know and thanks in advance.
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
 Rank: Addict
Joined: 7/19/2006 Posts: 821 Location: Århus, Denmark
|
I could also really use something like that, so if anyone can explain how this can be done I'm all ears :-)
|
 Rank: Addict
Joined: 3/17/2008 Posts: 982 Location: Nyborg, Denmark
|
Macros doesn't use datatypes, but macroGuiRenderings. You're still able to create your own however. There's no tutorial, but look in the macroRenderings project in the source.
You'll need to inherit the interfaces.IMacroGuiRendering interface and because umbraco doesn't (currently) auto discovers macroGuiRenderings like DataTypes, you'll need to add it to the cmsMacroPropertyType table.
Be aware that I do wish to do auto discovery of macroRenderings (as they are of great use actually), but that will probably break the old ones. As v3 is behind schedule I'm rather pessimistic whether we'll get auto discovery in v3, but just be prepared that you might have to adjust it a little in the future. And by the way, what's up with me being pessimistic - I guess I'm not all well yet ;-)
Hope this helps, Niels...
Jeeeez, did I really start this :-)
|