arthur_raft2
asked on
Conditional Link URL - Easy Question
Take a look at the following script.
A small block of links that will apear on various different pages.
The logic should be fairly simple to follow.
I need the link target addresses to vary according to the page or content that contains these links.
This might be based on URL?
It could also be based on some identifier or class contained in the surrounding content
Simpler the better - i.e, cSS. Javascrip if necessary.
Any suggestions ?
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href=" if current page = A, then link = B "><a href=" if current page = C, then link = D ">Text 1</a></a></td>
<td><a href=" if current page = E, then link = F "><a href=" if current page = G, then link = H ">Text 2</a></a></td>
<td><a href=" if current page = I, then link = J "><a href=" if current page = K, then link = L ">Text 2</a></a></td>
</tr>
</table>
A small block of links that will apear on various different pages.
The logic should be fairly simple to follow.
I need the link target addresses to vary according to the page or content that contains these links.
This might be based on URL?
It could also be based on some identifier or class contained in the surrounding content
Simpler the better - i.e, cSS. Javascrip if necessary.
Any suggestions ?
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href=" if current page = A, then link = B "><a href=" if current page = C, then link = D ">Text 1</a></a></td>
<td><a href=" if current page = E, then link = F "><a href=" if current page = G, then link = H ">Text 2</a></a></td>
<td><a href=" if current page = I, then link = J "><a href=" if current page = K, then link = L ">Text 2</a></a></td>
</tr>
</table>
In Apache, nginx, or IIS?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did this answer your question?