Partials are snippets of html and liquid that you can include within other templates (and indeed, in other partials).You should name your partial URL's like this "_sidebar" (with the leading underscore and no leading forward-slash).
You can then include your partial in your template with this Liquid tag:
Notice that we do not include the underscore when calling the partial. For performance reasons its not a good idea to put a partial within a loop. It will work, but that page will be slightly slower.
NOTE: You need to be careful to not make a partial include itself? It will certainly cause an error on that page.
Last updated 11 months ago