I was wondering if some one could point me in the right direction on
where to start this project. I am wanting to create a Doc Type that
add a set of new document types. So I have a rotating banner that I
want to be able to go to the contentsection and select add new banner
and it populates ( image picker, and Content picker ) and populate code
for the banner. And you can do this up to five times. I know this
will probably have to be done with C# and some other programming. I
just wonder if someone has already done this and if they could point me
in the right direction.
Do you mean that you're automatically get the children created? If so then you'll probably have to custom code it. I haven't seen a project which does this for you (it'd be a bit tricky to handle with the config).
Here's a sample event handler for you though:
void Document_New(Document sender, NewEventArgs e) {
string alias = sender.ContentType.Alias;
if(alias == "MyType") {
Document.MakeNew("Tabs", DocumentType.GetByAlias("Page Tab Container"), u, sender.Id);
Document.MakeNew("Download Items", DocumentType.GetByAlias("Container"), u, sender.Id);
Document.MakeNew("News Ticker", DocumentType.GetByAlias("Container"), u, sender.Id);
}
}
Does it need to be a document type? If it's just up to fove sets of banner code you're after, you caould have a look at the repeatable content plugin: http://our.umbraco.org/forum/ourumb-dev-forum/features/3824-repeatable-content-data-type that allows you to set up a mini-doctype that doesn't have any actual page associated with it (which I assume you wouldn't for a banner) and you can limit the number of times it can be added.
Document Type That add a set of Document types?
I was wondering if some one could point me in the right direction on where to start this project. I am wanting to create a Doc Type that add a set of new document types. So I have a rotating banner that I want to be able to go to the contentsection and select add new banner and it populates ( image picker, and Content picker ) and populate code for the banner. And you can do this up to five times. I know this will probably have to be done with C# and some other programming. I just wonder if someone has already done this and if they could point me in the right direction.
Do you mean that you're automatically get the children created? If so then you'll probably have to custom code it. I haven't seen a project which does this for you (it'd be a bit tricky to handle with the config).
Here's a sample event handler for you though:
Does it need to be a document type? If it's just up to fove sets of banner code you're after, you caould have a look at the repeatable content plugin: http://our.umbraco.org/forum/ourumb-dev-forum/features/3824-repeatable-content-data-type that allows you to set up a mini-doctype that doesn't have any actual page associated with it (which I assume you wouldn't for a banner) and you can limit the number of times it can be added.
Thanks Guys, I think i have a good place to start. Thanks for you Help
is working on a reply...