HTML Dropdown with links to child pages

I wonder if this is possible. I have a need to access a few child pages which can’t be done via a menu. I’ve seen buttons accomplish this but i would prefer a drop down. I have a dropdown created in a Custom Component which when hovered expands a menu of links. I have the links targeting the pages i need but this is where i’m stuck.

here is the dropdown in action
Loom | Free Screen & Video Recording Software

I guess I need to access the parent record ID

I saw Adams post which is getting the parent record ID form a component in the page. This can then be used in a card compent to access the linked child page.

Is there a way to get the html and javascript working together so that each link in the HTML component can open a different page but appennd the RecordID to the URL

And the code

CSS```

/* Dropdown Button */
.dropbtn {
background-color: #2d4152;
color: white;
padding: 16px;
font-size: 16px;
border: none;
}

/* The container

- needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #ddd;}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {display: block;}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {background-color: #4d5d6c;}

HTML

<div class="dropdown"><button class="dropbtn">Dropdown</button>
<div class="dropdown-content">
<a href="https://mortgagemanager.tadabase.io/mortgage-verse/cases/mortgage-planner/DVWQWRNZ49"> Mortgage Planner </a> 
<a href="https://mortgagemanager.tadabase.io/mortgage-verse/cases/protection-planner/DVWQWRNZ49"> Protection Planner </a> 
<a href="#"> Documents </a> 
<a href="#"> Case Check </a></div>
</div>