sumit270 Posted May 2, 2008 Share Posted May 2, 2008 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 More sharing options...
craygo Posted May 2, 2008 Share Posted May 2, 2008 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 Link to comment https://forums.phpfreaks.com/topic/103896-create-a-template-demo-please-help/#findComment-531868 Share on other sites More sharing options...
sumit270 Posted May 2, 2008 Author Share Posted May 2, 2008 Thank you I will give it a try update: I couldn't do it. Link to comment https://forums.phpfreaks.com/topic/103896-create-a-template-demo-please-help/#findComment-531878 Share on other sites More sharing options...
craygo Posted May 2, 2008 Share Posted May 2, 2008 Well give us some code for your index page. Ray Link to comment https://forums.phpfreaks.com/topic/103896-create-a-template-demo-please-help/#findComment-531916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.