Dodgebill Posted July 21, 2015 Share Posted July 21, 2015 I've been working on my own custom skin for CC6 for a few weeks now and there is one thing I would really love to include. I want to have a different layout on the home page than on the category or product pages. In CC4 it was pretty easy to do that but I'm not seeing a way to do it in CC6.Instead of using main.php for everything but checkout I want to have a template page called home.php or something like that so I can change box locations and so forth just on the home page. I think this will really open up the design possibilities. Does anyone know how to make this work? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 21, 2015 Share Posted July 21, 2015 content.homepage.php in templates should be what you want. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 21, 2015 Share Posted July 21, 2015 Well, it seems we are past the point of the last available hook, so that won't be an approach we can take.You could edit main.php and have two main sections. if {$SECTION_NAME} is equal to "homepage", show one section (or include a separate sub-template), otherwise show the original. Quote Link to comment Share on other sites More sharing options...
Dodgebill Posted July 21, 2015 Author Share Posted July 21, 2015 I'll give the if/else thing a try and let you know how it works out. Thanks for your help.When I get this to work I'll be posting this as a free skin in the market place. Yes, it is responsive! A ton of work but it's turning out nicely I think. Quote Link to comment Share on other sites More sharing options...
Dodgebill Posted July 22, 2015 Author Share Posted July 22, 2015 (edited) Genius! That works great.Here is the code I usedIn the main.php template file copy all the text between and including <body class="{$SECTION_NAME}"> and </body> and paste it AFTER </body>Change the first occurrence of<body class="{$SECTION_NAME}">to{if $SECTION_NAME=='home'} <body class="home"> and then change the second occurrence of<body class="{$SECTION_NAME}">to{else} <body class="{$SECTION_NAME}">Then change the last</body>to</body> {/if}Then change anything you want in the top section of the code for the home page layout (between the {if} and {/if} commands) and the code on the second half is for all the rest of the pages. Edited July 22, 2015 by Dodgebill Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 As I see it, when {$SECTION_NAME} is 'home', the 'home' <body> block will be rendered.But, after the {/if}, that starts another <body> block not controlled as an {else} block. Quote Link to comment Share on other sites More sharing options...
Dodgebill Posted July 22, 2015 Author Share Posted July 22, 2015 I had not yet scrolled down to the bottom of the page to see it start again. When I add the else block it breaks the page... any ideas? nevermind. Found it. I put {/else} at the bottom instead of {/if}. It's been a very long day....Works great now. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 Cheers to you! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 22, 2015 Share Posted July 22, 2015 Looking forward to seeing your new skin in action! Quote Link to comment Share on other sites More sharing options...
Dodgebill Posted July 22, 2015 Author Share Posted July 22, 2015 (edited) OK, so here is a funny new wrinkle. With the unique homepage mod in place when you go to the homepage the bxslider no longer works. Tried it in Foundation just to make sure and same thing. Completely baffled on that one. Any ideas where to start? Everything else works just fine.I have the test site up and running now. It's not a real store. DO NOT ORDER ANYTHING!http://www.cnkapparel.com/storeThis is lingerie based and maybe NSFW but it contains no nudity or adult content.You can select the different skins (at the bottom) and see the progress. I'm just starting the fashion skin today based on foundation. The other I have been building from scratch (mostly) for the past 2 months and is MUCH farther along. Edited July 22, 2015 by Dirty Butter fixed url Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 Just on first inspection, I see:<ul class="bxslider"> <li> <a href> <img> </a> </li> </ul>As an experiment, do not wrap the <img> tag inside an <a> tag. Do not make links out of the images.Unless, of course, this was working that way before the {if}{else}{/if} edits.On the other hand, I see this in my javascript console: $(document).fashion({equalizer:{equalize_on_stack:true}});TypeError: $(...).fashion is not a function.The stock code has: $(document).foundation({equalizer:{equalize_on_stack:true}});So, you would think to replace the name of the skin, 'fashion' from 'foundation'.No. The javascript function is named 'foundation' (what a coincidence!) and it must stay that way.Because of this error, the entirety of javascript crashed at that point. The bxslider javascript never got a chance to run. Quote Link to comment Share on other sites More sharing options...
Dodgebill Posted July 22, 2015 Author Share Posted July 22, 2015 It was working with the links until I made the homepage mod. I did just unlink the images just to see and no change. If I remove the mod it works again.Also, in the fashion skin (foundation based) the navigation subcategory drop downs on hover stopped working as well. It still works in my other skin but that is very differnt.It seems that there is some sort of error that is causing it to stop all scripts. I've never been able to figure out the debugging method for this for some reason. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 There have been edits to my reply above. Refresh the forum page and consider my other observations. Quote Link to comment Share on other sites More sharing options...
Dodgebill Posted July 22, 2015 Author Share Posted July 22, 2015 argh! That is why you never you the "replace" feature of your editor! Works great again Thanks for the catch.... wonder how long that would have taken me to find.... at least 4 hours and counting. Quote Link to comment Share on other sites More sharing options...
harrisorganic Posted July 24, 2015 Share Posted July 24, 2015 Getting your pictures to be responsive will be one of your next tasks. Try this link. I hope it is useful. http://www.smashingmagazine.com/2013/07/choosing-a-responsive-image-solution/ 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.