Jump to content


Photo

PHP/template page auto-creation?


  • Please log in to reply
1 reply to this topic

#1 hey_im_chris

hey_im_chris
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 15 July 2006 - 08:21 PM

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? :)

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 16 July 2006 - 12:00 AM

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.
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users