Jump to content

Create a template demo Please help


sumit270

Recommended Posts

Like on http://demo.icetheme.com/

I would like to make a template demo with this url structure http://example.com/index.php?template=it_newsy

 

Basically what i could like to do is assign the url according the available folder name, like in the link (http://example.com/index.php?template=it_newsy)  there is a directory named it_newsy, so therefore the link is valid

 

Well the page should be in frames like in the above example(http://demo.icetheme.com/)

 

eg.

/folders    -> http://example.com/index.php?template=folders

/demo1    -> http://example.com/index.php?template=demo1

/demo2    -> http://example.com/index.php?template=demo2

Link to comment
https://forums.phpfreaks.com/topic/103896-create-a-template-demo-please-help/
Share on other sites

just use an include

 

$include = isset($_GET['template'] ? $_GET['template']."/index.php" : "index.php";
// now in your frame use
include($include);

 

the GET value and index.php would be the default page in the folder. If it is something different change it. The last index.php should be the page you want to display in the frame if no template folder is found.

 

Ray

Archived

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

×
×
  • 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.