The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Internal link in dynamic url
HEW
post Jun 16 2021, 03:19 PM
Post #1





Group: Members
Posts: 2
Joined: 16-June 21
Member No.: 27,980



I have some code that's currently on a properly formatted page of its own. It has multiple internal links to the included glossary and footnotes. I need to add this to a website where the urls are constructed dynamically, and nothing I have tried is working.

The links are currently rendered, for example, as follows:

1. <a href="#General">Basic information</a><br>
2. <a href="#Comparison">Comparison of cinnamon varieties</a><br>
3. <a href="#Diabetes">Cinnamon for diabetes</a><br>
4. <a href="#Antioxidant">Cinnamon as an anti-inflammatory and anti-oxidant</a><br>

The target points are formatted appropriately and the whole thing has been working fine for years. But I need to add this to a website whose urls have a syntax of 'website.com/index.php?main_page=page&id=9&chapter=3/.' I tried using 'website.com/index.php?main_page=page&id=9&chapter=3/#General

That didn't work, nor did any of the other things I tried. Is this just not possible?

Thanks for any help.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 16 2021, 03:31 PM
Post #2


.
********

Group: WDG Moderators
Posts: 8,829
Joined: 10-August 06
Member No.: 7



QUOTE(HEW @ Jun 16 2021, 10:19 PM) *

I need to add this to a website whose urls have a syntax of 'website.com/index.php?main_page=page&id=9&chapter=3/.'

Should that URL really end with a slash? Then the PHP script would create a directory (which I'm not sure if it can be done that way).

I think this should work:
CODE
website.com/index.php?main_page=page&id=9&chapter=3#General
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HEW
post Jun 16 2021, 06:31 PM
Post #3





Group: Members
Posts: 2
Joined: 16-June 21
Member No.: 27,980



QUOTE(Christian J @ Jun 16 2021, 04:31 PM) *

QUOTE(HEW @ Jun 16 2021, 10:19 PM) *

I need to add this to a website whose urls have a syntax of 'website.com/index.php?main_page=page&id=9&chapter=3/.'

Should that URL really end with a slash? Then the PHP script would create a directory (which I'm not sure if it can be done that way).

I think this should work:
CODE
website.com/index.php?main_page=page&id=9&chapter=3#General



Thank you, that did work. I was going by the link I was given for where my code would be put. It had a slash at the end, so that's what I was trying to use. I didn't even think about the fact that it shouldn't have been there. Much appreciated!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 30th July 2021 - 06:37 AM