Support Forums

Different Template for home page

This is a discussion on Different Template for home page within the Templates, HTML, CSS, and Design Help forums, part of the General category; is it possible to have a different template for the main page and another for the rest of the site? ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 01-09-2007, 05:37 PM   #1
Junior Member
 
Join Date: Jan 2007
Posts: 12
Rep Power: 13
RyanG is on a distinguished road
Default Different Template for home page

is it possible to have a different template for the main page and another for the rest of the site? This is the only thing standing between me and a completed project....

Thanks,
Ryan
RyanG is offline   Reply With Quote
Old 01-09-2007, 05:41 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,305
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

Hi Ryan.

Which version do you have? Designer or Developer?
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 01-09-2007, 06:38 PM   #3
Junior Member
 
Join Date: Jan 2007
Posts: 12
Rep Power: 13
RyanG is on a distinguished road
Default

Sorry, I have designer.... hopefully its still possible?
RyanG is offline   Reply With Quote
Old 01-09-2007, 06:45 PM   #4
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 1,977
Rep Power: 58
juven14 is a jewel in the rough
Default

Isn't it possible to change the template by url? If so it might be possible to just use a redirect or mod_rewrite to add this in giving you a different template for whichever page you want.

From:
yoursite.com/index.php or yoursite.com

To:
yoursite.com/index.php?template=templatename
__________________
John Snyder
PHP Developer
juven14 is online now   Reply With Quote
Old 01-09-2007, 07:01 PM   #5
Junior Member
 
Join Date: Jan 2007
Posts: 12
Rep Power: 13
RyanG is on a distinguished road
Default

Quote:
Originally Posted by juven14
Isn't it possible to change the template by url? If so it might be possible to just use a redirect or mod_rewrite to add this in giving you a different template for whichever page you want.

From:
yoursite.com/index.php or yoursite.com

To:
yoursite.com/index.php?template=templatename
I attempted that, but it seems it makes the template change permanent across site unless i then change it again on every other page.
RyanG is offline   Reply With Quote
Old 01-10-2007, 02:14 PM   #6
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,305
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

Do you still want all of the home page functionality? If it is just a static front page then I can post some code you can use.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 01-10-2007, 02:51 PM   #7
Junior Member
 
Join Date: Jan 2007
Posts: 12
Rep Power: 13
RyanG is on a distinguished road
Default

I would love to keep the front page functionality.... but if thats not possible, I understand... I do however know a little PHP, so any code your willing to post to help me out would be much appreciated.

Thanks,
Ryan

Last edited by RyanG; 01-12-2007 at 05:46 PM.
RyanG is offline   Reply With Quote
Old 01-15-2007, 04:55 PM   #8
Junior Member
 
Join Date: Jan 2007
Posts: 12
Rep Power: 13
RyanG is on a distinguished road
Default

Not to be rude or anything, but are you still planning on posting some code?
RyanG is offline   Reply With Quote
Old 01-15-2007, 05:17 PM   #9
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,305
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

Sorry this post must have gotten pushed down and I missed your reply.

With the designer edition you wouldn't be able to keep the frontpage functionality but to create a static frontpage you can do this.

First make a backup of your index.php file then create a new one and include this:
PHP Code:
<?php
require_once('includes/init.php');
$class_tpl->display('layout.tpl.php');
?>
Then change the layout.tpl.php to the template file you would like to use.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 01-16-2007, 05:21 PM   #10
Junior Member
 
Join Date: Jan 2007
Posts: 12
Rep Power: 13
RyanG is on a distinguished road
Default

I went ahead and purchased the developer version.... would you be able to tell me how i could accomplish this with the developer version?
RyanG is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone made a single page Add New Listing template? bgordon v3.1 Modules & Modifications 9 03-31-2008 04:57 PM
Smarty Templates and You. Posted BY Lhotch Eric Barnes Templates, HTML, CSS, and Design Help 13 10-02-2007 09:06 AM
can I run scripts in an content page? dawyatt v3.1 Questions & Support 11 06-22-2007 03:50 PM
Problem getting page title flyingpylon v3.1 Questions & Support 5 10-19-2006 02:15 PM


All times are GMT -4. The time now is 12:51 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0