Can't get theme to work on multisite

Posted by Community Admin on 05-Aug-2018 16:53

Can't get theme to work on multisite

All Replies

Posted by Community Admin on 17-Feb-2017 00:00

Hi all,

I am using a trial version of Sitefinity 9.2. I have created a new theme and master page based on a video I found on this site (www.sitefinity.com/.../building-a-sitefinity-template) but unfortunately it did not fully work.

The video shows, but does not explain, the presenter creating a master page and linking it to some assets (css files and images). So, I was unable to determine the correct CSS and image path to use in my master file. After spending an entire morning on this, I found an old (2011) post on this forum explaining that the correct path to use is /Sitefinity/WebsiteTemplates/Themename/App_Themes/Themename/Images/image.jpg (you have to leave off the "App_Data" portion of the path).

So I have done this, and my theme still does not work. The text from the master page (menus, footer, etc) are visible but anything referenced with a URL (the CSS and images) are not working.

Eventually I tried to run the site from Visual Studio (using F5) and found that everything in fact worked! I then recalled that I had installed multisite, and I noticed that when running the site from Sitefinity, it adds my website name to the URL (e.g. localhost:12345/Websitename/)

This means that my images and CSS files would have to be pre-pended with the website name (/Websitename/Sitefinity/WebsiteTemplates/Themename/ etc) in order to work within the Sitefinity backend, preview, and "live website" buttons, but NOT have the site name on the live version.

Have I missed a step during configuration? There surely must be a way to see my theme's CSS and images while in the Sitefinity backend when I have multisite installed.

Thanks!

Posted by Community Admin on 27-Feb-2017 00:00

I received help from support. The solution was to place all of my CSS files in the global directory (I had them in the "styles" folder) and to remove the reference to the CSS files from the master page. The images can also not be referenced from the master page - I have to use placeholders and then add all the images from within Sitecore. (wish the video had gone over this!)

This might not even be an issue if you are not using multisite, so as a suggestion, additional documentation could be added for those using multisite.

This thread is closed