Maybe my logic was incorrect when creating a DataType/Macro for umbraco, but here it is:
I'm creating a social media links datatype that displays a list of social channels for the user.
The data is being saved as Json "{ChannelID:'Twitter',Url:'http://www.twitter.com/user'}"
The DataType is saving fine, but I'm having a hard time figuring out how to pull this data to render it as a macro.
I want to create a macro that will render html based on the channel and url. The macro will be similar to the DataType except that it won't show the textbox.
How do I load the data? I'm new at extending umbraco so am not even sure which table this data went to, or even if there's a helper that will load it for me!
Loading a DataType value into a Macro
Folks,
Maybe my logic was incorrect when creating a DataType/Macro for umbraco, but here it is:
I'm creating a social media links datatype that displays a list of social channels for the user.
The data is being saved as Json
"{ChannelID:'Twitter',Url:'http://www.twitter.com/user'}"
The DataType is saving fine, but I'm having a hard time figuring out how to pull this data to render it as a macro.
I want to create a macro that will render html based on the channel and url. The macro will be similar to the DataType except that it won't show the textbox.
How do I load the data? I'm new at extending umbraco so am not even sure which table this data went to, or even if there's a helper that will load it for me!
social media channels dataType
I can post code if necessary, in case my question isn't clear enough.
Does anyone have anything to say about this question???
I've been able to figure this out: My macro has a NodeID parameter and since the data is serialized (json), then I'm using a Json Deserialize helper
is working on a reply...