site looks one way loads another way - html

So I am editing code for a job- the files are old html css and shtml files. So all the html files have matching shtml files. When I download the files and put in my sublime text editor the outcome looks different then the real thing. And when I load them to a test site they look even more different. What is going on I am very confused.
this is the original site
When I load them in sublime the navigation on the left side is not there at all. but works the same.
this is the test site I loaded the site to
anyone have any idea on what is really going on with this? Its a basic cpanel too.

You have the div <class="sidebanner-frontpage"> nested within <div class="container-content-sidebar"> in one site, but not in the other. This is changing its layout.

Your web server is giving precedence to the ".html" pages. The ".html" pages have server side includes in them and they are not being rendered. You should take the ".html" pages out or include the sections manually that are included using SSI.
See this SO article for more information on shtml: What is shtml

Related

Copy/Pasting page source doesn't recreate same webpage. Why not?

Just as an experiment - I have taken the page source from a webpage I am viewing and copied it into a file on my desktop. When I try to open this file in my browser, I get a jumbled mess with no formatting.
What could the original page have that my copy does not?
Copying the files from original site through Viewsourcepage, you will not get the CSS and JavaScript files. Usually we call CSS and JavaScript from external source so that is the thing you are facing problem here
My best suggestion is if you want to copy the files from original website use Httracker. Download httrack from the website, Install it and use
Sounds like you're missing the stylesheets as well. Stylesheets include the styling (formatting) for the html.
There are probably CSS and/or JS files that are loaded dynamically from where ever you copied the HTML from. But they are probably relative locations, and you didn't copy those files too.
Static web pages will work when you do this. Their content do not change.
A lot of pages nowadays are dynamic and the source changes based on the client side JS code or values from the backend.
There could also be frameworks and a lot of dependancies for that particular page.
Instead of copy/paste manually, you can try some websitedownloader eg. it's an online one https://websitedownloader.io/

How can I access/edit the HTML file on Shopify?

I know this is probably a very basic/obvious thing, but I'm new to Shopify and trying to assist a client while a colleague is on vacation. I know what I need to change and how to change it, but not how to access it. When I go to Online Store and click Edit Code, I see all the Liquid, JSON, and even CSS files, but I can't find the HTML file I need to edit, nor can I find any of the HTML I need to edit within the theme.liquid file. The resources I'm finding are all either outdated (there is no "Edit HTML/CSS" option on the dropdown anymore) or unhelpful (like this). I can see the HTML in the console and upon clicking View Page Source, but I don't know how to get to it through Shopify. I feel like I'm losing my mind because this HAS to be very simple and obvious. If someone could please tell me how to access and edit the HTML file on Shopify I would be VERY grateful!
The html files are the liquid files.
There are no actual HTML files since this is a Shopify theme.
Depending on your theme, your files are located in:
theme.liquid - here are the header and footer
templates/*.liquid - all liquid files here are the main templates for the different pages
sections/*.liquid - the files here are usually used on the homepage and other pages as well
snippets/*.liquid - these are the reusable code snippets
So depending on your changes you will need to go through these files and update them for the specific changes.
Please have in mind that these files may be used on multiply pages and if you change one of them there is a possibility that this will affect other pages as well.

Some weebly features don't work when exporting to HTML and hosting on a different server

Recently I've been tasked with redesigning a website for the current company I'm working at. I've been using weebly to make the site, and then exporting the HTML to be re-hosted on the company's servers.
However, I've noticed that some functionality in weebly's code has stopped working. I imagine this might be due to weebly hosting some elements on their own servers, but this is merely a beginners best guess.
1. The picture for the logo on the banner does not appear once the HTML is rehosted
For comparison, here's the site while hosted on weebly:
http://mjmacoustique.weebly.com/
and the site on the company's servers:
http://www.mjm.qc.ca/redesign2015/
When weebly hosts, the ''MJM'' image should be on the top left and function as a return to home page button when clicked. However, when it's hosted on the company's server, the image is not found.
2. On Firefox, the background image of the home page is replaced with an all black background
When opened in firefox, it fails to load the background image of the main page.
Any help or solutions to these problems would be greatly appreciated.
Thanks.
I can help with question #1: the logo is hosted on weebly's servers, but in the html it's written in a shortcut method like this example: /uploads/2/6/8/5/26851316/1434298489.png"
the easy workaround would be to keep the weebly version of the site working, in in the html change the src value of the missing images to something like this http://mjmacoustique.weebly.com/uploads/2/6/8/5/26851316/1434298489.png
So you haveto add the http://YOURSITE.weebly.com before all the src values of your images.
otherwise, just load all the images you need on a blank page of the site on your servers, copy image urls of those and replace the urls in the html with that.
Hope that helps?
The firefox issue might also be solved if all your src values are linked correctly but I cannot be sure about that.
When I tried exporting a site from weebly, some assets were missing from the zip it produced. This resulted in some images failing to appear because they simply weren't there. I don't know how often this happens (or if it happens only for some sites), but weebly's export feature definitely seems to have bugs.
I worked around this by using wget to recursively fetch the content that weebly was hosting. Then I hand-copied the missing assets (and only the missing assets) from the directory structure saved by wget and merged them into the directory structure from weebly's export zip. This is time-consuming, but necessary since the directory structure fetched by wget includes dynamically-generated content (meta data for weebly's editor, assets with decorated names, etc) that you probably don't want in the content you host elsewhere.

Directing url to html homepage instead of an .asp homepage

I am trying to upload a new site in place of an existing one. The domain name and everything is already set. The old site how ever was built using asp files, so when I upload my html files, they don't link (going to the homepage only works if the homepage is .asp instead of .html, but that means none of my other pages will go back to that because all the links are html). I am using Filezilla, too. How can I change it to look for .html instead of .asp? Hopefully this makes sense, I have not encountered .asp files until now, so I am trying to figure out how this works.
If you don't have something server-based like form or input tags, then just rename the file from sth.html to sth.asp. It could work at least loading the page. If you have form tags or server-side part, then you have to edit your html code to asp grammar. Did I understand your question right?

Getting plain HTML/CSS versions of Wordpress themes, no PHP?

where can I find elegant looking Wordpress (or not Wordpress, but similar style) themes in plain HTML/CSS format, without all the php?
thanks.
View the page source of the theme preview page in your browser. Save the code.
Easy for one page. Difficult for many pages.
You need to see in browser each page you want to get the HTML/CSS.
Firefox Menu > View > View Source
IE Menu > View > Source
A good way not only to save but to study the design and HTML/CSS structure,
use FireBug, Firefox addon. I am very sure it save lots of time and you will love it.
I'm not sure what you mean in your question.
If you mean, "Are there themes for Wordpress that don't require php?" then the answer is no. However, you don't actually need to know php in order to use these themes. You can just load them and then alter only the CSS.
If you mean "How can I adapt a Wordpress theme for a non-Wordpress site?" then you'll have to do this yourself, manually. First make sure you are using Firefox and install Firebug. Go to a site that has the theme that you want and then open up Firebug.
Under the HTML tab you'll be able to see the static HTML of the page, after it has been processed by the backend PHP. Just click "Edit" and then copy and paste everything in there into a new file. Then click the "CSS" tab and go through each style sheet, again clicking on Edit in order to copy and paste everything into new files, 1 for each sheet. Then stick all of the files into a folder and edit the header of the html file to make sure the external stylesheet links are pointing to the stylesheets you have created. Open it up in a browser and it should look just as you want it to.