Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have to take all content types from the database. The problem is with nested content. Where do I find what kind of nested content in one content type? For example we have Document type id 1062 that has name MultiplePod and has nested content named Pods with ID 1060. The nested content contains Document type Single pod with id 1055. I found all in the database in the table UmbracoNode. The only thing that I can't find is where is the connection between nested content ID 1060 and its content types 1055
I might not understand you correctly, but I'll give it a go:
Are you mixing up Node ID's with Document Type ID's?
I need to know where can I find the Document Type ID of the Document types used in a specific nested content
I need to know where can I find the Document Type ID or the Node Id or any ID of the Document types used in a specific nested content
You can get the DocumentType by using:
var items = model.Content.Value<IEnumerable<IPublishedElement>>("myPropertyAlias");
foreach (var item in items)
var id = item.ContentType.Id;
No this is not the solution I'm searching for. In the project I don't have Umbraco installed and I need to find them in the database. Since everything in Umbraco needs to be saved in the database, so this should be too. The question is where is the connection between the nested content and Id of the tab or document type saved?
I'm not entirely sure if this is what you are looking for but you can get the content from the database by following the next steps.
Search through the cmsPropertyType table and search for properties related to your Document type, in your case 1062.
WHERE contentTypeId = 1062
You can find your nested content property by alias. Use the id of the property to search through umbracoPropertyData table like so:
WHERE propertytypeid = [yourId]
Hopefully this will help you a bit. :)
The first query gives me the nested content component, thats ok but I need to get what is inside that nested content, the nested content contains another document types i need the IDs of those document types.
For the second query, this table doesn't exist, I'm using Umbraco 7, exactly 7.15.0
Sorry.. I used a V8 database, for V7 you need the cmsPropertyData table.
WHERE propertytypeid = [yourId]
cmsPropertyData is completely empty because I don't have content. And I don't need nothing from the content, just the structure.
Ok, maybe the cmsDataTypePreValues table is what you are looking for. The nested content structure is saved here. In this table you can find contentTypes (saved as JSON), minItems, maxItems etc.
Use the cmsPropertyType table again but get the dataTypeId.
Next step is to get the configuration, you can use the cmsDataTypePreValues table to find it.
WHERE datatypeNodeId = [yourId] AND alias = 'contentTypes'
The value will look like something like this:
If you want to get the document type(s) you can use the ncAilas to query the cmsContentType like so:
WHERE alias = 'typeOne'
Yes Thanks Eric-Jan. I went thru all the tables seems like this is the only way to connect the document type with the nested content. Sadly no connection by ID, even because of using JSON instead of normal database types it is difficult to query it.
FROM cmsPropertyType INNER JOIN
cmsDataTypePreValues ON cmsPropertyType.dataTypeId = cmsDataTypePreValues.datatypeNodeId
WHERE (cmsDataTypePreValues.alias = N'contentTypes') AND (cmsPropertyType.contentTypeId = 1062)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted