I'm trying to get my head around Macros, XSLT & document types so have been trying to create a basic events listing page. I created an XSLT file (EventsList.xslt) and pasted in the same code that the 'Article' XSLT file uses as I'm thinking they will work in a similar fashion.
Then I created a Macro which uses the events.xslt file.
Next I created a Document type for the Events page. This uses the 'Standard' template in the 'allowed templates' options.
When I try to add an event, the only doc types I get are 'Article' & 'Standard'... I'm probably missing something obvious but any pointers appreciated.
I think you are confusing Templates and Document Types (easily done).
On your doc type settings, the allowed templates section refers to the templates that doc type is allowed to use (ie the underlying HTML), where as what you need to set is the "allowed child nodetypes" on the "structure" tab for the parent document you are trying to create the document under.
In the doc type settings, modify the parent doc type (ie the doc type of the page you are trying to create the new page under) and on the structure tab, check the chckbox next to you new doc type in the list and hit save. You should then be able to select it from the dropdown.
Thanks Matt. I think I was getting confused with how the heirarchy works. It's making a bit more sense now. I can get the Events Doc type in the dropdown now but in the 'Generic Properties' tab I get this which I think is causing me issues & I think the reason my events won't display content.
"Master Content Type enabled This Content Type uses Content Master
as a Master Content Type. Properties from Master Content Types are not
shown and can only be edited on the Master Content Type itself"
Is this because I set the Events Doctype up using the 'Standard' Master document type and should have selected 'None'... Can this be changed once set?
Thats correct yes. Think of Master Doc Types similar to master pages in .NET, but instead of inheriting layout, you inherit it's properties.
If you didn't want to inherit 'Standard', then yea, you should have selected 'None' as the master doc type. Unfortunatley there is no easy way to undo setting the master doc type. I do have a package that can do it, but it needs a bit of an update so it might not work (especially if you are using 4.6.x)
If you haven't setup to much on your doc type, I'd probably just delete it and recreate it. If you've done quite a bit of work on it though, you might want to give the doc types extension package a try (I'm not promissing anything though =)
I haven't added much and we are just testing the platform at this stage. I've already created a new Doctype & selected 'None' but still struggling to get my events to display. I'll stick with it and let you know how I get on!
New Document Type not displaying
I'm trying to get my head around Macros, XSLT & document types so have been trying to create a basic events listing page. I created an XSLT file (EventsList.xslt) and pasted in the same code that the 'Article' XSLT file uses as I'm thinking they will work in a similar fashion.
Then I created a Macro which uses the events.xslt file.
Next I created a Document type for the Events page.
This uses the 'Standard' template in the 'allowed templates' options.
When I try to add an event, the only doc types I get are 'Article' & 'Standard'... I'm probably missing something obvious but any pointers appreciated.
Hi David,
I think you are confusing Templates and Document Types (easily done).
On your doc type settings, the allowed templates section refers to the templates that doc type is allowed to use (ie the underlying HTML), where as what you need to set is the "allowed child nodetypes" on the "structure" tab for the parent document you are trying to create the document under.
In the doc type settings, modify the parent doc type (ie the doc type of the page you are trying to create the new page under) and on the structure tab, check the chckbox next to you new doc type in the list and hit save. You should then be able to select it from the dropdown.
Many thanks
Matt
Thanks Matt. I think I was getting confused with how the heirarchy works. It's making a bit more sense now. I can get the Events Doc type in the dropdown now but in the 'Generic Properties' tab I get this which I think is causing me issues & I think the reason my events won't display content.
"Master Content Type enabled
This Content Type uses Content Master as a Master Content Type. Properties from Master Content Types are not shown and can only be edited on the Master Content Type itself"
Is this because I set the Events Doctype up using the 'Standard' Master document type and should have selected 'None'... Can this be changed once set?
thanks...
Hi David,
Thats correct yes. Think of Master Doc Types similar to master pages in .NET, but instead of inheriting layout, you inherit it's properties.
If you didn't want to inherit 'Standard', then yea, you should have selected 'None' as the master doc type. Unfortunatley there is no easy way to undo setting the master doc type. I do have a package that can do it, but it needs a bit of an update so it might not work (especially if you are using 4.6.x)
http://our.umbraco.org/projects/developer-tools/doc-type-extensions
If you haven't setup to much on your doc type, I'd probably just delete it and recreate it. If you've done quite a bit of work on it though, you might want to give the doc types extension package a try (I'm not promissing anything though =)
Matt
Cheers Matt,
I haven't added much and we are just testing the platform at this stage.
I've already created a new Doctype & selected 'None' but still struggling to get my events to display. I'll stick with it and let you know how I get on!
Thanks again.
David.
Reviving this thread just to say thanks, it took several read throughs to understand the solution. Thanks again
is working on a reply...