dylandcor Posted February 16, 2009 Share Posted February 16, 2009 This is probably a very simple question, but any help would be appreciated. I have multiple pages that have a sidebar with links in it. I use the file sidebar.php to house the links. I was wondering if there was any way I could check which file was including sidebar.php so I could dynamically change the links based on where the user is in my site. I thought about assigning a variable in each main page and checking it in the sidebar.php, but I was wondering if there was an easier way. Any help would be appreciated! Link to comment https://forums.phpfreaks.com/topic/145406-solved-including/ Share on other sites More sharing options...
haku Posted February 16, 2009 Share Posted February 16, 2009 That is one way to do it, and probably the easiest. You can also create a function that checks the URL, but that's a little more work. Link to comment https://forums.phpfreaks.com/topic/145406-solved-including/#findComment-763347 Share on other sites More sharing options...
dylandcor Posted February 16, 2009 Author Share Posted February 16, 2009 Thanks! Link to comment https://forums.phpfreaks.com/topic/145406-solved-including/#findComment-763490 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.