Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an empty html file in my shopify website?

Tags:

shopify

is it possible to create an empty html file say ex : myname.html I tried to create a layout and add it to a page, but it seems the layout cannot be empty. I got an error while creating an empty layout file.

Is there anyway to achieve this?

Sorry i cannot post this under "Shopify" tag under webmaster or meta version or stackexchange, because there is no such tag in it.

like image 322
balanv Avatar asked Jan 05 '12 13:01

balanv


1 Answers

If it's okay for the URL of the page to be /pages/myname and not /myname.html, then here's another work-around:

  1. Go To Blogs & Pages and create a page. Call it, say, 'My Page'. Give it the handle 'myname'.
  2. Go to Themes > Template Editor, and create a new 'page' template under Templates. Call it say, 'special'. The name of the file will become page.special.liquid.
  3. Delete the content of that file. At the top of the file, add this: {% layout none %}, then add your HTML. Save.
  4. Go back to your 'My Page' under Blogs & Pages, and assign your page.special template to it. Save.

See this for more info: http://support.shopify.com/customer/portal/articles/263930-creating-and-using-an-alternate-template-for-pages-products-collections-and-blogs

like image 184
Caroline Schnapp Avatar answered Nov 17 '22 10:11

Caroline Schnapp