I have a client who has a huge site that would better serve their visitors if split up into two separate sites. So now I'm trying to split it up, while still sharing certain files between the two (essentially, the only thing that changes is the navigation and pages; the header, footer, and styling should all be the same between the two sites).
So now I am trying to create an If Else statement in ASP.net and VBScript that will switch out certain elements based on what the site's root file path/url is going to be. So far, it looks something like the following:
<% If objPage.FilePath = "/" Then %>
Show Content A
<% Else %>
Show Content B
<% End If %>
Which doesn't really help me as it only seems to effect the home page and not the other site pages. How might I change it to trigger based off the site address or, failing that, is there a variable I can stick in the quotes that will affect not just the root files, but all the subpage files as well?
Also, is there a better way to be going about this?
Aucun commentaire:
Enregistrer un commentaire