This project has moved and is read-only. For the latest updates, please go here.

Output folder

Topics: Developer Forum, User Forum
May 9, 2007 at 2:39 AM
Which program is controlling the output folder; Sandcastle or SandcastleBuilder?
(I mean the \Working\Output\Html\ path).

The extra directories are making it difficult working with <img> tags. If it is SandcastleBuilder,
I am willing to modify and create a custom version to meet my needs - I just want to know.

Best regards,
May 9, 2007 at 2:59 AM
Edited May 9, 2007 at 3:00 AM
BuildAssembler always places its generated help topic content in Output\Html. It's in the Sandcastle.config file as a parameter to the SaveComponent. In addition, there are several other folders copied to the Output\ folder that contain the styles, icons, scripts, etc (Output\styles, Output\icons, etc). This structure under the Output\ folder needs to be maintained as the transformations used to create the help topics use relative paths to access the images and scripts in the named folders.

If you have additional content in the project, by default it is copied to the Output\ folder. This is effectively the root folder. To access an image there in an img tag in the XML comments, you can use a relative path ("../Test.gif"). There is a DestinationPath property on each additional content item that lets you specify to which folder the content is copied. So, if you set it to Html\, it would end up in the same folder as the member help topic files and you wouldn't need a relative reference on the path. If you set the destination path to a different folder name, you just need to include it in the path as well (i.e. "../Images/Test.gif").

There is an example of this in the FAQ in the help file.

May 9, 2007 at 5:12 AM
Thank you very much.
I think the problem was with the "AdditionalContent" property. I was able to use it to get the image displayed as required, except with one problem...

Is there any Sandcastle trick to center the images? I have tried the HTML <center> tag, but this is stripped off by the Sandcastle in the output.

Best regards,
May 9, 2007 at 4:16 PM
The Sandcastle transformations strip out any tags they don't recognize. You can add "center" to the main_sandcastle.xsl transformation file for the Prototype and VS2005 styles. Search for the comment "pass through html tags" and add it to the expression there. However, as I recall, <center> is a deprecated tag. You can use CSS or a <div align="center"> to center stuff instead.

May 10, 2007 at 1:35 AM
Thanks for the support and the information. I will go for the <div align="center">.

Best regards,