- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
I want to dynamically build web pages as per the user’s posted requests, driven by a menu.
The pages are built from three parts:
– a header.php file containing the
section, referencing the css and JS files, plus a chunk of the
loading some png common files (banners). The info is static here.
– a footer.php file containing a
section, the usual information about a page. The info is static here as well.
– a set of ‘content’ pages (part of the
section) that are dynamically loaded as per the user’s request, sent to an index.php file which aggregates all three parts (I use this file as a controller). Ex: if the user asks of a ‘list’ action, I send ‘index.php/?request=list’, which loads (it really does, except for the rendering and JavaScript event handlers) the list.php content page, if it asks for a ‘user’ action, I send ‘index.php/?request=user’, which loads the user.php content page etc.
The problem I have is that it works fine when I load/build the first page, but for all subsequent requests the
references (css and js files) are not recognized by the elements of the loaded ‘content’ page; and my new built page doesn’t have the styling and the event handlers activated. When I trace the URI I see that the JavaScript, the css files and the png static files are part of separate requests to the index.php controller. Therefore I’m missing something here about the .htaccess file configuration (perhaps something else?). Ironically, I regularly use that in Zend, but it seems that the framework kept me away from understanding the use of the index.php controller.
Thanks for help!
Got it! By mistake my posts to the index.php page had a / before the request string. Now it works normally … Sorry to bother you!