Drew – love the idea, sounds great, but I’ve not used any ASP before – what do I do with it, please?!
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Dynamic Site Map (All Versions)
Home » Forums » Developers, developers, developers » Web design and development » Dynamic Site Map (All Versions)
- This topic has 35 replies, 3 voices, and was last updated 22 years, 2 months ago.
AuthorTopicViewing 1 reply threadAuthorReplies-
WSDrew
AskWoody LoungerFebruary 6, 2003 at 7:59 pm #651365Wow, the first response to my ‘Star Post’ I posted weeks ago!
I feel all giddy now.
As to your question, you don’t have to do anything with it. Just save/upload it to your website. Then put a link on a page so you can get to it. (Or get to it manually http://mysite/sitemap.asp). You can put the .asp file anywhere on your site, it doesn’t matter, and it will display the sitemap of your site (based on your Frontpages Navigation.)
It does allow three different ways to display. Once you have uploaded it, and viewed it, you can change the hyperlink that directs you to it to have ?View=AllBullets or ?View=ChildBullets these are called ‘QueryString’s. The ASP file reads it. If it doesn’t see any, it defaults to just using Indentions (?View=Indented does that too), if it does see a value for ‘View’, it uses the method requested.
Let me know if this doesn’t answer you question.
-
WSBerylM
AskWoody LoungerFebruary 6, 2003 at 8:15 pm #651369Thanks for the quick response, but it doesn’t seem to be seeing anything! The navigation is all set up but the sitemap page remains determinedly blank. I haven’t adjusted the view at all yet … but then I haven’t viewed anything yet …
I put it in one of my photo sites Davrica Cats (the link is off the bottom of the left frame) – perhaps you could have a look …?!
-
WSDrew
AskWoody LoungerFebruary 6, 2003 at 8:20 pm #651373You’re right, it’s not doing anything. The problem is, the webserver isn’t reading the ASP as ASP, it’s reading it all as HTML, because you get the ASP code when you view the source, instead of what the ASP code is supposed to kick out.
Does your hosting service support ASP? (What’s you’re hosting service?)
-
WSDrew
AskWoody Lounger -
WSBerylM
AskWoody LoungerFebruary 6, 2003 at 8:30 pm #651378Who’s Verio? My hosting site is UK Space 4 U, and I don’t know if they support ASP or not, I’ve never had reason to ask them!
However, the ASP code showed up in the html window in FrontPage from the start, and that was long before I sent it to the webserver …?
Even more
!!!
-
WSDrew
AskWoody LoungerFebruary 6, 2003 at 8:44 pm #651383When I did a whois search, it brought up Verio. Wierd, your hosting must lease their IP’s from them.
Anywho, I looked at the UK Space 4 U site, and it doesn’t allow for ASP. ASP is Active Server Pages. It is a server side script. What you see in Front Page is the ASP code. But when it is run on an ASP enabled web, you won’t see anything that is between the flags. Anything between those flags is ‘read’ by the server, and not sent to the user. That allows for ‘dynamic’ pages. Your site allows for PHP, which is the PERL version of ASP. I may see if I can write that thing in PERL. Who knows. If I do, I’ll post it here.
-
WSBerylM
AskWoody Lounger -
WSDrew
AskWoody LoungerFebruary 6, 2003 at 10:26 pm #651411Can you do me a favor, and put the attached file (unzipped) into your root web directory? Same place as sitemap.asp. Then link it and try it. Does it show your site’s navigation (listed, not like sitemap.asp is supposed to do. I decided to learn PHP today
, so I am going to make a php version that should work on your site. But I want to make sure what I wrote works on another php enabled server, since it took me an hour to set mine IIS up with php extensions.
-
-
-
WSDrew
AskWoody Lounger -
WSBerylM
AskWoody Lounger -
WSDrew
AskWoody Lounger -
WSBerylM
AskWoody LoungerFebruary 7, 2003 at 8:15 am #651501Hi Drew, thanks for all this, and sorry I didn’t respond to your request to test last night – I was very tired and I’m afraid I went to bed!
I must admit I wish I could just decide to learn something that is effectively a whole new language and be able to do exactly what I want with it just a couple of hours later!
I’ll try it tonight when I get home.
-
WSDrew
AskWoody Lounger -
WSBerylM
AskWoody LoungerFebruary 11, 2003 at 9:20 pm #652712Sorry, I had a lot on and didn’t get a chance to have a look!
Anyway, no, I’m afraid it didn’t. I got this message instead – do you know what’s wrong?:
Warning: file(“./_vti_pvt/structure.cnf”) – No such file or directory in /home/b/e/beryltwo/public_html/davrica/test.php on line 9
Warning: Invalid argument supplied for foreach() in /home/b/e/beryltwo/public_html/davrica/test.php on line 12
Warning: file(“http://www.example.com/”) – No such file or directory in /home/b/e/beryltwo/public_html/davrica/test.php on line 17
Warning: Bad arguments to implode() in /home/b/e/beryltwo/public_html/davrica/test.php on line 17It looks to me like it’s looking for an example file of some sort and not finding it?
-
WSDrew
AskWoody Lounger -
WSBerylM
AskWoody Lounger -
WSBerylM
AskWoody LoungerFebruary 11, 2003 at 9:43 pm #652731OK, the other one gave this message:
Warning: file(“./_vti_pvt/structure.cnf”) – No such file or directory in /home/b/e/beryltwo/public_html/davrica/sitemap.php on line 82
Warning: Invalid argument supplied for foreach() in /home/b/e/beryltwo/public_html/davrica/sitemap.php on line 83Is it just me or has anyone else had trouble with this?!
-
WSDrew
AskWoody LoungerFebruary 11, 2003 at 11:25 pm #652774It’s having problems finding your structure.cnf file. I think the ‘site’ you are working on is a subweb. It should have it’s own structure file, so open that php file in FrontPage, and got to the HTML tab. Go to line 82, and remove the period before the slash. If that doesn’t work, you’ll need to find that file. Check out post 217511. Read the three methods of finding that file. Post back with the file structure to where that file is.
-
WSBerylM
AskWoody LoungerFebruary 13, 2003 at 7:11 pm #653319Hi Drew; still not working, I’m afraid!
As far as I’m aware, it’s not a subweb; it has its own FrontPage window and is linked to other webs I have only where I have specifically hyperlinked them. The structure.cnf file is in the _vti_pvt folder, exactly as expected.
The error I’m getting now is:
$line){ if(strpos($line,”,”)){ $line=str_replace(“,”,chr(0) . chr(0),$line); } $Temp=Explode(“,”, $line); foreach($Temp as $Word){ $Word=str_replace(chr(0) . chr(0),”,”,$Word); } $Elements=count($Temp); if($Elements==7){ $Records[$RowCount][0]=$Temp[0]; $Records[$RowCount][1]=$Temp[4]; $Records[$RowCount][2]=$Temp[1]; $Records[$RowCount][3]=$Temp[3]; $RowCount++; } } $RowCount–; } ?>
It looks to me as if removing the fullstop just caused an error in the document! I tried removing the slash as well (which would be the requirement if it was straight html, looking at a subdirectory) but the same thing happened …
Feel free to check it out at http://www.berylm.com/davrica%5B/url%5D – the link is still at the bottom of the left frame!
Sorry to be such a trouble …
-
WSDrew
AskWoody Lounger -
WSBerylM
AskWoody LoungerFebruary 14, 2003 at 11:19 pm #653807Now we get an error message that at least reads in English!
Warning: file(“/home/b/e/beryltwo/public_html/davrica/_vti_pvt/structure.cnf”) – No such file or directory in /home/b/e/beryltwo/public_html/davrica/sitemap.php on line 82
Warning: Invalid argument supplied for foreach() in /home/b/e/beryltwo/public_html/davrica/sitemap.php on line 83
I’ll send you a PM with details and you can have a fiddle with it yourself – maybe you can get it to work for me!
-
WSDrew
AskWoody Lounger -
WSWebGenii
AskWoody Lounger -
WSDrew
AskWoody LoungerFebruary 18, 2003 at 4:55 am #654416Well nothing so far. At least not that we can ‘prove’ yet. I have not been able to find the ‘structure.cnf’ file on her ‘server’. We think it may be an issue that the file is being kept on her local desktop, which is a possibility, but remote. A lot of ‘navigation’ features use webbots, which would have to ‘see’ the structure on the server. Not too mention that her navigation wouldn’t be available from another machine (if she needed to make a change from another location). (I think she is going to try that…not sure…to see if the ‘structure’ appears on another machine, which would prove that it is on the server or not).
Hey Beryl, if you read this, there is something else that may be the cause. It is quite possible that the file is ‘secured’ in some way, that would be causing that error. Many times a security problem will create the same error as when the file doesn’t exist. Maybe you could contact your hosting company to find that file, and if they can find it, set the permissions a little looser (at least to allow for reading it). You maybe able to read it from FP, because you should be ‘logged’ into the site with Admin credentials (for your site).
-
WSBerylM
AskWoody LoungerFebruary 20, 2003 at 10:43 pm #655247Good news – I manually uploaded the _vti_pvt folder, complete with structure.cnf, and if you go to the page and have a look, it now works – click here to see! (scroll down in the left frame to see link to sitemap).
So the next questions would be, (1) how do I apply styles (I know that’s not what it would be, but the equivalent), eg make the top level bigger and bold, next level just bold, etc? and (2) each of those links needs to open the page in the left frame, not the main window; how do I get it to do that?
Anyway, many thanks, Drew – a very useful bit of code!
-
WSDrew
AskWoody LoungerFebruary 20, 2003 at 11:17 pm #655265That is odd that FrontPage was ‘storing’ the data locally. Wierd. I wonder if it will start using the web based structure.cnf now that it’s there!?!?
As far as styling….ummmm….other then changing the font or background, doing ‘layered’ styling is going to be a bit more difficult. It is building that tree from code, so in order to change the style that it is using, you will need to modify the code, based on how ‘deep’ you are into the tree. Also, keep in mind that a ‘scaled’ effect could get too small, or too big, the ‘deeper’ your website gets.
-
WSBerylM
AskWoody LoungerFebruary 21, 2003 at 7:37 am #655349Regarding the styling, fair enough – it’s not important, it’s only cosmetic, after all.
However, the fact that the links are appearing in the wrong frame is not cosmetic – the site doesn’t work when the pages come up in the middle instead of the left frame!
Any chance of a way of correcting that?
Ta muchly
-
WSDrew
AskWoody LoungerFebruary 21, 2003 at 6:27 pm #655455Not sure what you mean by that. Are you saying the script pulls nothing up when it’s loaded in the left frame? That doesn’t make much sense, since the script is pulling from the same file either way. Or are you saying the links on the page are pulling the pages into the wrong frame? If that second guess is the problem, that is relatively easy to fix. Go into the code, and look for the part where it is building the ‘Iink’. Have the link changed to have a ‘Target’ property, to point to your main frames name.
-
WSBerylM
AskWoody LoungerFebruary 26, 2003 at 1:50 pm #656787It’s the second problem – the target frame is wrong – and your solution sounds right, but how on earth do I implement it? I mean what exactly do I add to to the link to change the target? I’m willing to be it’s not target:=”…” as it would be in html!
Please go right down to basics, I know no PHP at all …!
-
WSDrew
AskWoody LoungerFebruary 27, 2003 at 4:39 am #657031Okay, here’s a little lesson in server side scripting. With PHP and ASP, your code is ‘run’ on the server, but to have it interact with a web user, it writes or outputs results to an HTML page.
In ASP, you can use response.write or =, in PHP you use print or echo. So, here’s a line from the php sitemap page.
print ‘‘ . $Records[$i][3] . “n”; (I had to put spaces within the markers so it would show in this post.)
In the code above, it is printing everything after the print command. However, it is a ‘string’ that is put together with variables. ‘< a href="' prints ‘ to be ‘ target=”_blank”>’ You will need to do this in several places, since there are several places that are outputting HTML. (With the print or echo command).
-
WSBerylM
AskWoody LoungerFebruary 28, 2003 at 10:33 am #657359Great – that works perfectly! (once I realised I needed to replace the ‘_blank’ with the name of the left frame!)
Next question – you mention in passing that you can specify which type of layout you want (indented, bulleted or child bullets), but you don’t say how to do that – I tried just replacing the instances of “” with “allbullets” but it didn’t do anything – is there something else I need to do instead?
Many thanks for this – it’s a great tool!
-
WSDrew
AskWoody LoungerFebruary 28, 2003 at 4:17 pm #657438Whoops, my bad, I was a wee bit tired when I wrote that post…..before taking my advice, always ask if my caffiene levels are normal!
Yes, the _blank tells it to use a new window…or instance of the browser. You just have to replace it with the name of any frame for that frame to be the ‘target’.
The layout is specified by the View Querystring….
http://www.mysite.com/sitemap.php produces an indented format.
http://www.mysite.com/sitemap.php?View=Indented also produces and indented format.
http://www.mysite.com/sitemap.php ?View=AllBullets produces a bulleted list where all links are bulleted.
http://www.mysite.com/sitemap.php?View=ChildBullets Produces a bulleted list where all links but the root nav(s) are bulleted.I actually had that listed in the original ASP post.
-
WSBerylM
AskWoody LoungerFebruary 28, 2003 at 5:53 pm #657475Yes, that works perfectly, Drew, many thanks! By the way, just out of curiosity, when you wrote:
___________________________________________Whoops, my bad, I was a wee bit tired when I wrote that post…..
___________________________________________What was ‘my bad’ supposed to be?! I can usually guess or work out what people mean with the odd typos, but that one’s got me stumped!
-
WSDrew
AskWoody Lounger
-
-
-
-
-
WSDrew
AskWoody LoungerFebruary 7, 2003 at 1:53 am #645861A few weeks ago I posted about a Dynamic SiteMap page, that used an ActiveX .dll that I wrote in VB. I had a comment or two about VB ActiveX controls, since not all hosting companies allow for ActiveX controls.
Attached is an .asp page that creates a dynamic sitemap using FrontPage’s navigation file. (In other words, the page will always show a site map built from the current navigation). This page does NOT use an ActiveX .dll, it is strictly ASP. So obviously you must have a service provider that allows for ASP. The only quirk I can think of, which may trip this code up, is that it uses the FileSystemObject to read the FrontPage data file. If anyone has a problem using this page due to that, you may be able to use ADO to read the file. Let me know, and I’ll look into it, or if you rewrite it with ADO, post it please.
One last thing. It displays in three different ‘modes’.
sitemap.asp or sitemap.asp?View=Indented Builds the page with the links being indented. (Looks fine, but source is full of
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Manage your browsing experience with Edge
by
Mary Branscombe
3 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
5 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
6 minutes ago -
Apps included with macOS
by
Will Fastie
7 minutes ago -
Xfinity home internet
by
MrJimPhelps
4 hours, 55 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
6 hours, 55 minutes ago -
Debian 12.11 released
by
Alex5723
15 hours, 21 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
19 hours, 3 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
48 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
15 hours, 31 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 11 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
1 day, 2 hours ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 14 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 6 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
14 hours, 27 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
7 hours, 18 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
2 days ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 20 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 10 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 14 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
22 hours, 1 minute ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
10 hours, 40 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 16 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 16 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 5 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
3 days ago -
0Patch, where to begin
by
cassel23
2 days, 18 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 14 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
3 days, 2 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 23 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.