Jump to content

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? :)
Link to comment
https://forums.phpfreaks.com/topic/14697-phptemplate-page-auto-creation/
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.