Pachman3000 Posted May 5, 2010 Share Posted May 5, 2010 Hey guys, Newbie here, trying to do some minor updates to my site. I want to use a different layout for one page of my site that has a signup form. I'm not sure where to start, since the layout is constant and called from the shells for each page. Any help would be great! Quote Link to comment Share on other sites More sharing options...
ignace Posted May 5, 2010 Share Posted May 5, 2010 What do you mean by another layout? HTML or CSS? Quote Link to comment Share on other sites More sharing options...
Pachman3000 Posted May 5, 2010 Author Share Posted May 5, 2010 An example I can think of right now similar to what I'm trying to do is Twitters. Home page in comparison to the sign up page Quote Link to comment Share on other sites More sharing options...
ignace Posted May 5, 2010 Share Posted May 5, 2010 HTML thus. Do you use a template engine? Quote Link to comment Share on other sites More sharing options...
Pachman3000 Posted May 5, 2010 Author Share Posted May 5, 2010 No. I have the template already created if that's what you're asking? Quote Link to comment Share on other sites More sharing options...
Pachman3000 Posted May 5, 2010 Author Share Posted May 5, 2010 Right now the template is constant throughout the site. The HTML for it is located in the top and bottom shell of the site. So when I create a new page it automatically assigns that template to the new page. Quote Link to comment Share on other sites More sharing options...
ignace Posted May 5, 2010 Share Posted May 5, 2010 You need to use a template engine (like Smarty) then you can do something like: $engine->display('layout1.tpl'); Quote Link to comment Share on other sites More sharing options...
Pachman3000 Posted May 5, 2010 Author Share Posted May 5, 2010 Thanks, however, is that my only option? Quote Link to comment Share on other sites More sharing options...
ignace Posted May 6, 2010 Share Posted May 6, 2010 No, of course not. There are multiple options, but this one is by far the most flexible. Quote Link to comment Share on other sites More sharing options...
arbitter Posted May 8, 2010 Share Posted May 8, 2010 I have a question in the same genre as well; what's the easyest way to get php variables into a css sheet? Quote Link to comment Share on other sites More sharing options...
ignace Posted May 8, 2010 Share Posted May 8, 2010 sheet.css.php #wrapper { width: <?php print $width ?>px; } <link href="sheet.css.php" .. Again, you have many options here it depends on how you architect your application. So, how did you architect your application? Quote Link to comment Share on other sites More sharing options...
arbitter Posted May 8, 2010 Share Posted May 8, 2010 Well I was just wondering, I'm on this site where you can choose the layout-colors of your page manually, but I was wondering if you needed a serverside script that made a new css file or if indeed you could simply let it be a php file? thanks! Quote Link to comment Share on other sites More sharing options...
ignace Posted May 8, 2010 Share Posted May 8, 2010 Well I was just wondering, I'm on this site where you can choose the layout-colors of your page manually, but I was wondering if you needed a serverside script that made a new css file or if indeed you could simply let it be a php file? thanks! In this case it's possible to have pre-defined stylesheets on your server and call them using JS <link id="sheet-screen" .. var link = document.getElementById('sheet-screen'); link.setAttribute('href', newSheet); The browser will automatically apply the new styles. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.