2

I'm trying to target the directory location specifically after publishing a page.

If I have a page with a .xml extension and in my cd_storage_conf.xml. I've added this:

<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
    <Root Path="c:\inetpub\wwwroot\test.com" />
</Storage>

<ItemTypes defaultStorageId="defaultdb" cached="false">
    <Item typeMapping="Page" itemExtension=".xml" cached="false" storageId="defaultFile" />
</ItemTypes>

I'm expecting that the file would then be deployed to the root of the site but instead what I'm getting is:

  • c:\inetpub\wwwroot\test.com\us\en\page.xml

To me, there seems to be two issues here:

  • The /us/en/ is a publication within Tridion. We have one for several other countries like /uk/en/ etc. This is causing a set of new directory to be created. Why?
  • Why is the page.xml not added within the root of test.com?

Has anyone encountered these before?

2 Answers 2

2

Check your Publication's Publication Path property in the Content Manager - Suspect you'll find that it is set to \us\en, which is dictating where your page in the root Structure Group is deployed.

To make your page publish without that extra path, you'd need to remove that property from the Publication but that would affect everything else when republished. You'd have to implement some publication specific storage nodes the cd_storage_conf.xml in order to restore the paths for the other item types.

7
  • Hi David. Thanks for your comment. That path is necessary within Tridion to structure the site and determine how to navigate to other sites. Is there no way of getting around this without changing that? Is there no way to simply target a directory without creating any publication directories?
    – Tim Alonso
    Aug 10, 2015 at 14:58
  • @TimAlonso was just updating my answer to include that info. You'd have to remove the publication path and then implement the equivalent in your storage config somehow. I don't think that's an easy work-around for you. Easier to find another option for your XML file in my opinion. Aug 10, 2015 at 15:12
  • Hi David. I'll keep that in mind and I'll keep looking for other potential alternatives. Thanks.
    – Tim Alonso
    Aug 10, 2015 at 15:15
  • If the XML file is something that isn't specific to a Publication, could you create a new Publication with no Publication Path specified and publish it from there? Aug 10, 2015 at 15:17
  • I could but it seems excessive for a single XML file though.
    – Tim Alonso
    Aug 10, 2015 at 15:19
0

You should bind items with their publication. The code below should give you the expected result. Where ID is publication id of your site “test.com”

<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" 
                           Id=" filesystemDocRootPublicationId">
    <Root Path="c:\inetpub\wwwroot\test.com” />
</Storage>
<Publication Id="ID" defaultStorageId="defaultdb">
   <Item typeMapping="Page" itemExtension=".Xml" 
         storageId=" filesystemDocRootPublicationId" />
</Publication>
1
  • <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id=" filesystemDocRootPublicationId"> <Root Path="c:\inetpub\wwwroot\test.com” /> </Storage> <Publication Id="ID" defaultStorageId="defaultdb"> <Item typeMapping="Page" itemExtension=".Xml" storageId=" filesystemDocRootPublicationId" /> </Publication>
    – Ritu
    Jan 11, 2016 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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