Ben224 Posted November 4, 2013 Share Posted November 4, 2013 Hello fellow Cubecarters, I am currently designing my second cubecart website. I have extensive experience working with HTML and CSS and I am wondering how much of it I can sensibly drop into the source code tabs via my dashboard? At the moment I'm specifically looking at dropping a fair bit of code into the content areas of the document pages. I.e images, links possibly a bit of jquery. I know this probably sounds like a short cut to some of you coding folk out there but is there a good reason why NOT to populate the source facility from within the dashboard as opposed to hard coding the template skin files? Anyone? Many thanks. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 4, 2013 Share Posted November 4, 2013 I am not recognizing what you mean by "how much [ code ] I can sensibly drop into the source code tabs via my dashboard." "Dropping a fair bit of code into the content areas of the document pages, i.e., images, links, possibly a bit of jquery." Composing the content in the rich text editor is limited by a few things, none of which you should encounter: 1. The maximum amount of data that can accompany a POSTed web form -- set by your hosting provider -- in my experience is much higher than you would ever need (unless you're uploading a movie file). 2. Limits on how much data can pass through the database client/server connector. 2. Other esoteric limits Quote Link to comment Share on other sites More sharing options...
Ben224 Posted November 4, 2013 Author Share Posted November 4, 2013 Hi Bsmither thanks for responding, Ok I think that answers my question. No movie files then. I just want to add structural HTML i.e. Divs, Images and links and was wondering what the pros and cons were if any between implementing code directly via the text editor and implementing code directly into a skin file. I realize once the page has rendered fully in the browser the end result is the same in both of these instances but would adding code via the text editor have any adverse effect on loading time for instance? Many thanks Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 4, 2013 Share Posted November 4, 2013 Mathematically, pushing 95KiB versus 55KiB, sometimes compressed, there is a difference. Whether it is human perceptible, I cannot say. (I suppose there would be a perceivable difference on a 56K baud modem.) The RTE is fairly complete, although I have no extensive experience with it. But for whatever purpose you are given to use the RTE, the content is for that purpose. That content will be within the containing block of the content file, and that content file will be within the containing block in the main.php template. I had occasion once to "break" the HTML of a template. I was given this: <img src="{$name}" /> But I wanted -- only in certain circumstances: <img src="#" style="blah" onclick="bloo" /> So, I just coded $name (in the RTE source mode) for: #" style="blah" onclick="bloo This closed the quoted src string, added other stuff, and relied on the final quote after {$name}. If what you aim to do is have RTE content "break" the HTML, I honor you for the Odyssean journey you are about to take. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 4, 2013 Share Posted November 4, 2013 Specifically, the data type to hold a Document's content, a Product or Category's description, email content, etc, is TEXT. The MySQL storage capacity is just short of 2^16 bytes. Quote Link to comment Share on other sites More sharing options...
Ben224 Posted November 4, 2013 Author Share Posted November 4, 2013 Hmmm ok I think I may need to reconsider taking the long way round and not the text editor shortcut I envisaged. It's useful to know what is possible with the RTE thanks for the overview. Quote Link to comment Share on other sites More sharing options...
Ben224 Posted November 5, 2013 Author Share Posted November 5, 2013 Hi, so I am now instead looking at creating a 1 column layout for my home page and a 3 column layout for all other pages. Having researched a little on the forum I have found the following code: {if isset($LATEST_PRODUCTS)} {include scope=parent file="skins/$SKIN_FOLDER/templates/main.normal.php"} {else} {include scope=parent file="skins/$SKIN_FOLDER/templates/main.alternate.php"} {/if} I've put this code into my main.php file. This is the only code that exists in that file at the moment as I have stripped all other code out. I also created an additional two main pages - main.normal and main.alternate which retain all the usual code. What I want to do is get CC to call up main.normal.php (1 column layout) for the home page and main.alternate.php (3 column layout) for all other pages. I know that the latest products feature is only called on the homepage so in theory main.normal.php should load when the home page is called? And once i click out of the home page i should load the main.alternate.php taking its place and giving me the 3 column layout? It was a bit of a long shot and it's not working. Can anyone help? Many thanks. 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.