Customization of the conceptual user manual pages

Topics: Developer Forum, User Forum
Oct 8, 2009 at 3:01 PM

Hello, everyone!

We need your help.

How can we customize the conceptual user manual (MAML): apply the corporate style sheet with our specific font styles and insert the logo image to its pages (at the top of the pages where the page titles are displayed)?

Thank you in advance!

Coordinator
Oct 8, 2009 at 3:24 PM

Inserting a logo is easy enough.  Add the PostTransformComponent to the project using the project's ComponentConfigurations property, edit it's configuration, and specify the logo that you want to use and its placement.  Applying your own stylesheet to the MAML content independently of the API topics isn't possible.  The point of using MAML is that the topics take on the appearance of the selected presentation style used for the API topics.  All you can do is modify the presentation style's stylesheet which would then apply those styles to both the MAML topics and the API topics.  You'll find the presentation stylesheet file in a .\Styles folder under each style's main folder under C:\Program Files\Sandcastle\Presentation.  To get separate styling and/or layout of the conceptual topics, you'd need to use HTML files instead.

Eric

 

Oct 9, 2009 at 1:57 PM

Thank you, Eric, very much!

Could you help whether we can use any image as a background image for the top section (title) of the pages? As fa as  I could undestand to change the styles, we have to update the presentation stylesheet file that you mentioned. So, I made the following change:

/*------------------------------ Begin Non-scrolling Header Region Styles -------------------------------*/
/* Applies to the entire non-scrolling header region. */
div#header
{
    background-color: #FFFFFF;
    padding-top:    0;
    padding-bottom:    0;
    padding-left:    0;
    padding-right:    0;
    width:    100%;
    background-image: url(../SandCastle_testing/Logo.jpg);
}

inserting, as you can see, the URL to the image that I would like to place on each page at the top. I defined this image in the project's ComponentConfigurations property. After I build the project, the image gets displayed on each page, but it is not applied to the background. Could help solve this issue? where should this image be placed in order it got applied to the background?

Thank you in advance.

Coordinator
Oct 9, 2009 at 2:53 PM

If you're modifying the Sandcastle transformations and/or stylesheets, you won't need the PostTransformComponent.  Instead, you should place your image in the presentation style's .\Icons folder and change the URL in the stylesheet to "../icons/Logo.jpg" so that it finds it.  The build will copy the file automatically since it's now part of the stock set of files.

Eric

 

Oct 12, 2009 at 4:41 PM
EWoodruff wrote:

If you're modifying the Sandcastle transformations and/or stylesheets, you won't need the PostTransformComponent.  Instead, you should place your image in the presentation style's .\Icons folder and change the URL in the stylesheet to "../icons/Logo.jpg" so that it finds it.  The build will copy the file automatically since it's now part of the stock set of files.

Eric

 

As it turned out it is impossible to configure the PostTransformComponent property if two people are working on the same SandCastle project, as the paths to the image that they define are different, as the project is stored in different locations on their computers. So, the wayout is to update the SandCastle stylesheet on each workstation. So, we placed our image into c:\Program Files\Sandcastle\Presentation\vs2005\icons\ and now we have to modify the stylesheet file according to your advice. Could youprompt where we can indicate the path to the image in the stylesheet file (c:\Program Files\Sandcastle\Presentation\vs2005\Styles\Presentation.css)? in which tag?

Thank you in advance.

 

Coordinator
Oct 12, 2009 at 5:04 PM

The folder structure is the same within the project folder so you can use something like {@ProjectFolder}\Images\Logo.png to tell it where to find the image.  The substitution tag will be replaced with the project folder at build time.  This is covered in the plug-in's help topic.

Eric

 

Oct 12, 2009 at 6:07 PM

Thank you! Your advice is very useful and helpful as usual