DNNCommunity / DNNDocs

The documentation site for the open source Content Management System DNN (formerly DotNetNuke).
https://docs.dnncommunity.org
23 stars 52 forks source link

Tut. > Theme Objects > Add TEXT and move ControlPanel #713 #714

Closed Timo-Breumelhof closed 7 months ago

Timo-Breumelhof commented 7 months ago

Closes #713

Timo-Breumelhof commented 7 months ago

@david-poindexter Hmm, not sure how I could have prevented that merge conflict..? Maybe I should have done it in 2 PRs?

Timo-Breumelhof commented 7 months ago

@valadas Hmm. "index.ascx.resx" does work (I have it in my test Theme). And that's what has always been in the documentation. But I guess both work, I'll try it in my test Theme with index.resx

david-poindexter commented 7 months ago

@david-poindexter Hmm, not sure how I could have prevented that merge conflict..? Maybe I should have done it in 2 PRs?

Typically this happens due to the current state of the branch from which you based your working branch. If it is not up to date with the latest version, then you could simply get the latest from the base branch and merge it into your working branch.

Alternately, we could try to manually Resolve conficts in the browser. See the red brackets in the below screenshot and determine which branch "wins", or determine what should be the corrected lines there for this file if it is different than the two branches represented.

image

valadas commented 7 months ago

Hmm, apparently, I am wrong (or this has changed at some point in DNN history). I just tested and you are right about the file name at least in current versions. I could have sworn I had old themes using just the folder name for the file so the localization would be available for multiple layouts having a single source of truth.

Timo-Breumelhof commented 7 months ago

Hmm, apparently, I am wrong (or this has changed at some point in DNN history). I just tested and you are right about the file name at least in current versions. I could have sworn I had old themes using just the folder name for the file so the localization would be available for multiple layouts having a single source of truth.

Actually that's a valid point. It would be nice if you could have one resx file for all layouts. Maybe we could add an attribute public string ResourceFile { get; set; } For that..

sleupold commented 7 months ago

@Timo-Breumelhof
afaik you can use "skin.ascx.resx" for your purpose.

Timo-Breumelhof commented 7 months ago

@Timo-Breumelhof afaik you can use "skin.ascx.resx" for your purpose.

I also had the idea something like that existed but it does not seem to work. And I don't see anything for this in the core code either.. https://github.com/dnnsoftware/Dnn.Platform/blob/9367336b703f8251c4c9c09fa09655246cd10513/DNN%20Platform/Website/admin/Skins/Text.ascx.cs#L32

sleupold commented 7 months ago

ok, maybe I mix it up with skin.css and skin.js. in this case, supporting skin.ascx.resx (or skin.resx) would make sense.

valadas commented 7 months ago

Strange, I was also pretty sure there was a way to not have to do a file for each control and there was a way to have a file for the whole theme. I was proved wrong though...