logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
cmdigital  
#1 Posted : Friday, May 24, 2019 10:31:35 AM(UTC)
cmdigital

Rank: Newbie

Groups: Registered
Joined: 5/15/2019(UTC)
Posts: 6
United Kingdom

I have followed the instructions in the documentation for setting up the themes by creating a theme at the portal level.

Everything seemed fine as alterations to the ProductDisplayDetail.cshtml template in my portal theme are working. However I'm now trying to change the ProductDisplayListBody.cshtml template in my portal theme and the site just doesn't recognise it. It continues to pick up the template from the DesktopModules\NBright\NBrightBuy\Themes\ClassicAjax.

I've tried clearing cache, recycling app pool, creating a brand new theme and changing module settings but it continues to use the wrong template.


Has anyone ideas what I could be doing wrong or how I can fix this. I don't want to use the default ClassicAjax theme because of concerns that someone may upgrade the module and overwrite the theme.

I'm using DNN v. 09.03.02 (24) and the version 4.0.7 of openstore
leedavi  
#2 Posted : Friday, May 24, 2019 2:17:19 PM(UTC)
leedavi

Rank: Administration

Groups: Registered, Administrators
Joined: 11/6/2016(UTC)
Posts: 325
United Kingdom
Location: France

Was thanked: 28 time(s) in 28 post(s)
In your portal template you'll see a razor token "RenderRazor" or something like that. That will have a hard coded path to the system level template, you need to change the path to your portal level templates.
cmdigital  
#3 Posted : Friday, May 24, 2019 2:44:28 PM(UTC)
cmdigital

Rank: Newbie

Groups: Registered
Joined: 5/15/2019(UTC)
Posts: 6
United Kingdom

Thanks for this.

I couldn't find anything within the ProductDisplayListBody.cshtml template. But I changed in ProductDisplayAjaxList.cshtml template the line - @RenderTemplate("\\Portals\\0\\Themes\\ClassicAjax\\Default\\ProductDisplayListBody.cshtml", Model) and in ProductDisplayAjax.cshtml template I changed the line @RenderTemplate("\\Portals\\0\\Themes\\ClassicAjax\\Default\\ProductDisplayAjaxList.cshtml", Model) . So these 2 templates are now pointing towards the portal but still hasn't made a difference.

Do I need to go through every template in the portal folder and change all the hardcoded @RenderTemplate? I thought it was automatically set up that the portal templates would override the DesktopModule templates?
leedavi  
#4 Posted : Friday, May 24, 2019 4:20:24 PM(UTC)
leedavi

Rank: Administration

Groups: Registered, Administrators
Joined: 11/6/2016(UTC)
Posts: 325
United Kingdom
Location: France

Was thanked: 28 time(s) in 28 post(s)
Well, not sure what's happening. But the template system is designed to take the portal first and if no portal exists, take the system level.

Of course if you move a template to the portal level and one of these hard coded paths is pointing to the the system when you need the portal one, you will need to ensure it is pointing correctly.

As I remember it should only be a couple of templates that do that (To stop duplication of code.), we usually just move all changed templates to the portal level. it should not be difficult to get right.

Make sure you have cleared cache. there is an option in the store settings to put the store in debug mode, this will turn OFF caching and is recommended for development.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.055 seconds.