4
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory"
         Id="devFile" defaultFilesystem="false">
    <Root Path="C:\inetpub\Development" />
</Storage>
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory"
         Id="dataFile" defaultFilesystem="true" > 
    <Root Path="c:\inetpub\Data" /> 
</Storage>

above is my configuration in storage file and following lines showing my item types mapping.

<ItemTypes defaultStorageId="dataFile" cached="false">
    <Item typeMapping="ComponentPresentation" storageId="devFile"/>
    <Item typeMapping="Page" cached="false" storageId="devFile"/>
    <Item typeMapping="Binary" cached="false" storageId="dataFile"/>

I have some "components" and I believe these are xml files(if I open them in webdav, extension of these components is xml) but when I publish them these components are moved as txt files on file system.

Are they believed to be moved as txt files?

These components are stored in a folder hierarchy in CMS but after publishing they are moved into the root folder of Development directory, why same hierarchy is not maintained?

4

Let me tell you the simple process to verify:

  • Identify the schema of the component
  • Use "Where Used" on schema and note all the Component Templates it is being used (Also note all the pages it is being used)
  • Identify what all component templates are marked as static and dynamic
  • When you publish the component, it will get publish with all the dynamic component templates and all the pages will also get publish on which this component with any of the static component is associated
  • If there is any dynamic component templates, check the extension specified in it - if it is specified as .txt
  • Also check for all the pages this component is used and check for the file extension specified in the page and if it is .txt

Note that if you publish it through the page, the hierarchy in which your page is published will be the hierarchy of the Structure Group and not of the hierarchy of folders of your component which you are using

  • Minor clarification : dynamic component templates won't have any extension.. may be you meant to say it as Output Format. HTML Fragment or Plaintext goes as .txt and other go respective .asp/.jsp/.xml depending on the output format. – Ram G Nov 11 '13 at 19:39
  • @RamG: Thanks for pointing out Ram, I meant to say the Output Format :P – Pankaj Gaur Nov 12 '13 at 2:01
4

OK, you might be in for a ride.

Components are stored as XML in the Content Manager. When you publish components, Tridion will:

  • Find Component Templates that are associated with the schema of the component
  • Of those, find the ones that are marked to be "rendered dynamically"
  • Render the components with those templates and publish the resulting output

In other words, it's not guaranteed at all that the content you will have on the Content Delivery is in XML. Actually, that is seldom the case.

You see, Components are never published, what is published is what is called a Component Presentation, or the result of applying a template to the component. So the format you'll get on the delivery tier is whatever the template generates.

Pages are the ones that behave as you expect with regards to maintaining hierarchy. There is a hierarchy maintained in the Content Manager that gets reproduced on the delivery side. Components however may exist in multiple pages, and therefore they have no real "path".

The fact they show as .txt means that's the "Output Format" as defined in the component template that was used to render the components. You can find out which template(s) is(are) being rendered by going to the publishing queue and investigating the details of the publish transaction (double click on one). Go to the "Processed Items" tab, check the box that says "show successful" then click refresh. You should see a list of the Component Templates that were used to render your component(s).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.