Book a call

Fill out the form and we will call you back as soon as possible

Emergency situation

In case of emergencies or breakdowns, you can send an SMS to our emergency hotline

On-call phone (SMS only)

+45 29 70 15 95

Send an SMS with the following information:

  • Your name and webshop
  • Description of the problem
  • Your callback phone number

Notes: This service is only for critical situations where your webshop is down or has serious problems. For regular support, please use our normal support channels.

Link to stylesheet and other files in your theme

Guide to linking to stylesheets, JavaScript and other files from your Shoporama theme.

Reading time: approx. {eight} minutes
Developer

When linking to stylesheets, JavaScript files or images in your Shoporama theme, it's important to use the correct paths. Here we'll walk you through how to do it right.

Use $theme_url

The {$theme_url} variable points to your theme's root directory. Use it to link to all files in your theme:

<!-- Stylesheet --> <link rel="stylesheet" href="<{$theme_url}>/css/style.css"> <!-- JavaScript --> <script src="<{$theme_url}>/js/main.js"></script> <!-- Image --> <img src="<{$theme_url}>/img/logo.png" alt="Logo">

Why $theme_url?

The reason to use {$theme_url} instead of a hardcoded path:

  • Portability - the theme works wherever it is installed
  • CDN support - the URL can automatically point to a CDN
  • Flexibility - the theme folder can be moved without changing code

Other useful URL variables

Variable Variable Description
{$theme_url}Theme root directory (for CSS, JS, images)
{$domain}The domain of the shop
{$webshop}The webshop object with all settings

Important to note

Never use absolute paths like /user_templates/4/mittema/css/style.css. It will break if the theme is moved or installed on another shop.

Need help with theme development? Contact us at support@shoporama.dk.