Nav bar worked then didn't

D

Duncan Chesley

Hi,

I have a VB program that modifies a template htm file and then starts
up FP2000, creates a subweb and publishes the page in the subweb. All
this needs to run in unattended mode while I get my beauty rest.

I got the VB program running yesterday and published this page:

http://www.americanimage.com/dsi/cvc/aetnatm1s.htm

Note the nice nav buttons.

Today when I run the program to publish a new subweb I get this:

http://www.americanimage.com/dsi/emila/regbnk1-3tm1s.htm

The nav buttons have reverted to text. When I view the source for the
two pages in my browser, the former has a bunch of theme-related html
added throughout the page by FP when publishing. The latter one's
source looks just like the page that I told FP to publish. It looks
like it didn't understand or find the theme.

If I use FP to open the broken page on the server, the buttons show up
in Normal view. If I tell FP to resave the page then the buttons show
up in my browser, too.

I did not modify the VB program or any settings in FP. I suppose I
must have done something to the template used to create the pages, but
I can't discover what.

There is a default.htm page in both subwebs you can look at if that
might be relevant. They are the same as far as I can tell. They look
like the given pages with broken links for the graphics image.

The unmodified watermar theme folder is stored on my machine in:
C:\Documents and Settings\ME\Application Data\Microsoft\Themes

Can anyone give me a clue about what might cause a problem like this?

TIA
Duncan
 
T

Thomas A. Rowe

Is your VB program publishing the entire contents of the subweb and all related theme content is
within this local folder/subweb, and not just individual pages?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
D

Duncan Chesley

Is your VB program publishing the entire contents of the subweb and all related theme content is
within this local folder/subweb, and not just individual pages?

Hi Thomas,

My VB program creates a new subweb and then publishes a default.htm.
Then it adds a nav node for the link back to the AI home page as a
leftmost child.

Next it publishes the 2 image files at the top of the page (company
name and facing blue bars).

In a loop for each png-htm pair it publishes the .png file for a page,
then the htm page that contains the .png file. Next it adds a
rightmost child nav node for the htm page just uploaded.

After all the htm pages are published it applies the navigation
structure and closes FP.

Is there something else somewhere that needs to be published?

Cheers,
Duncan
 
S

Stefan B Rusynko

In the first link the theme is applied incorrectly as
<meta name="Microsoft Theme" content="watermar 000, watermar">
vs.
<meta name="Microsoft Theme" content="watermar 000, default">

In the second link it is not applied as the default
<meta name="Microsoft Theme" content="watermar">

You need to apply the theme as a default to each subweb
See
http://msdn.microsoft.com/library/d...ficeFrontPageWorkingWithThemes.asp?frame=true



| On Thu, 5 May 2005 13:31:54 -0400, "Thomas A. Rowe" <[email protected]>
| wrote:
|
| >Is your VB program publishing the entire contents of the subweb and all related theme content is
| >within this local folder/subweb, and not just individual pages?
|
| Hi Thomas,
|
| My VB program creates a new subweb and then publishes a default.htm.
| Then it adds a nav node for the link back to the AI home page as a
| leftmost child.
|
| Next it publishes the 2 image files at the top of the page (company
| name and facing blue bars).
|
| In a loop for each png-htm pair it publishes the .png file for a page,
| then the htm page that contains the .png file. Next it adds a
| rightmost child nav node for the htm page just uploaded.
|
| After all the htm pages are published it applies the navigation
| structure and closes FP.
|
| Is there something else somewhere that needs to be published?
|
| Cheers,
| Duncan
|
|
 
D

Duncan Chesley

In the first link the theme is applied incorrectly as
<meta name="Microsoft Theme" content="watermar 000, watermar">
vs.
<meta name="Microsoft Theme" content="watermar 000, default">

In the second link it is not applied as the default
<meta name="Microsoft Theme" content="watermar">

You need to apply the theme as a default to each subweb
See
http://msdn.microsoft.com/library/d...ficeFrontPageWorkingWithThemes.asp?frame=true

Stefan,
Thanks. That's good to know.

After some very helpful offline discussion with Thomas Rowe who helped
me see what was going on with the problem while using FP manually, I
was able to make my VB program apply the theme correctly.

My goal was to have an unattended VB6 program that would create a new
subweb that includes a navigation bar that uses a theme.

The VB code looks somthing like this (WinXP Pro, VB6, FP2000):

--
Dim oFPweb As frontpage.Web
Dim oFP As frontpage.Application

' Start FP on the local machine
Set oFP = CreateObject("Frontpage.Application")

' Open the web
Set oFPweb = oFP.Webs.Add(YourURL, YourUserName, YourPassword)

' Activate the web
oFPweb.Activate

' Add/Replace files to the subweb one at a time with a command like
this
oFPweb.RootFolder.Files.Add FilePath, True

' Put the page into navigation view if the page is an htm page but
' don't do this for default.htm

Call oFPweb.HomeNavigationNode.children.Add _
(PgName, ButtonName, fpStructRightmostChild)

' After all the files are added to the subweb
' Apply the navigation structure to update everything.

oFPweb.ApplyNavigationStructure
oFPweb.Refresh
oFPweb.RecalcHyperlinks

' Apply the "blank" theme that is referenced in the Meta tag and in
' the navigation bar spec (webbot) in the html for each page.
' Evidently you must use one of the MS default themes and not a
' custom theme.
' Remove the background if you want.

For Each SiteFile In oFPweb.RootFolder.Files
If InStr(SiteFile.Name, ".htm") <> 0 Then
Call SiteFile.ApplyTheme("blank", fpThemePropertiesAll)
Call SiteFile.ApplyTheme("blank",fpThemeNoBackgroundImage)
End If
Next SiteFile

' Close the current web
Set oFPweb = Nothing

' Close FP
oFP.WebWindows.Close
Set oFP = Nothing

---

I had to put Sleep functions in a few places to make VB wait for FP to
finish on my slow machine.

Thanks to all, and especially Thomas Rowe, for the help!

Duncan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top