how would i do this -- Can i include a custom datatype as a macro parameter? Options
bootnumlock
Posted: Tuesday, January 16, 2007 5:11:25 PM

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.com
Business Blog: http://www.maliciousthinktank.com/blog
Personal site: http://www.baty-barr.com
Level 1 Certified!
mortenbock
Posted: Wednesday, January 17, 2007 10:03:50 AM

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 :-)

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

hartvig
Posted: Wednesday, January 17, 2007 10:48:42 AM

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 :-)
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.