Davka Posted January 28, 2007 Share Posted January 28, 2007 I'm migrating a bunch of pages from an older website into a PHP-based site, and some of them have numerous A NAME html tags, creating links to various spots in the body of the page, such as footnotes and whatnot. Is there any way to replace these with a similar marker in PHP, short of the obvious-but-tedious route of making each section into its own separate page?In case you've never tried it, using an A NAME link on a PHP-driven site doesn't work. The hash mark in the address causes errors every time.Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Tandem Posted January 28, 2007 Share Posted January 28, 2007 I have a page that does it just fine.I do<a href="#Misc">Miscellaneous<./a>for the link and<a name="Misc">Blah<./a>for the part of the page i want it to go to. (minus the dots)EDIT: it was a php page too (forgot to mention that) Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 28, 2007 Share Posted January 28, 2007 To correct your errors, we'd need to see your code to tell what you're doing wrong. Quote Link to comment Share on other sites More sharing options...
Davka Posted January 28, 2007 Author Share Posted January 28, 2007 Perhaps I should elaborate. These pages are being pulled in as required pages inside a larger PHP container page.IOW, "oldPage.html" is required by "newSite.PHP" and the browser address is "newSite.php?content=oldpage&navigation=blah"This means that simply clicking on a link like A HREF="#foo" won't cut it, since there is no corresponding tag in newSite.php?content=oldpage&navigation=blah. And writing "newSite.php?content=oldpage.html#foo&navigation=blah" throws a real monkey wrench in the works.. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted January 28, 2007 Share Posted January 28, 2007 what if you put navigation first then content, because my site is set out sort of like that and i can still use the A NAME to get to certain things. Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 28, 2007 Share Posted January 28, 2007 clicking on an # link doesn't reload the page, it simply jumps down to the link, so the page doesn't get reloaded, and the url won't get messed up. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.