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?

1
  • Tridion doesn't publish components natively. Instead if publishes representations of those components. Each representation is made by a so-called component template. You might want to follow along with this tutorial: albertteboekhorst.com/tridion/tridion-tutorial Commented Nov 11, 2013 at 16:50

2 Answers 2

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

2
  • 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
    Commented Nov 11, 2013 at 19:39
  • @RamG: Thanks for pointing out Ram, I meant to say the Output Format :P Commented Nov 12, 2013 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 and acknowledge you have read our privacy policy.

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