Jump to content


This topic is now archived and is closed to further replies.


PHP/template page auto-creation?

Recommended Posts

Hey everyone ^_^

I'm working on a design for something at the moment, and I'm hoping some simple PHP can make things a bit easier for me. What I want to achieve is when a user clicks on a link to one of the galleries, a new page appears and depending on the name of the link, the corresponding album.php and title.gif appear on it's index.php. I imagine this can be achieved with a template.

For example:
[pre]1. User clicks on a link called abc.php.
2. A new page appears that has the main layout/design on it.
3. abc/imgs/album.php loads into an iframe, and abc/title.gif loads at the top of the page.[/pre]
(all links are relative to the main directory)

I could do this manually, but I have 79 pages to create and growing. Semi-automation would be superb! Any advice? :)

Share this post

Link to post
Share on other sites
It would be easier if the link they clicked was in the form template.php?gallery=abc

Then in template.php you can retrieve the passed value of the gallery name (from the $_GET array) and then construct $gallery/imgs/album and $gallery/title.gif to use as needed by the template.

Maybe that'll give you some ideas you can use.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.