We've planned to use an Umbraco site for documenting and providing our system users with a User manual. Now I've run into a small problem...
My wish is to be able to send system version, from our system via URL to the Umbraco site, to be able to show the right version of the user manual.
In our system we have a bunch of entities, for example Carrier, that are documented in Umbraco, on separate content pages (based on a custom Document Type), with the properties Title and Description.
Over different system versions the Description property might vary, so I need to be able to modify the description property but would still like to contain the different versions within the same content page; i.e. I want to be able to visit the following two URL's having them show the same content page but with different content.
That way you can just create entire new sub site (copy the last one!) each time you reversion. Links can be to a generic domain - default you can just keep 302ing to the latest subdomain?
The thing is that only small parts of the documentation will be updated between different system versions, so to make a complete copy seems a bit to much?
My current situation is that I have a document type that defines nested content and have VersionFrom, VersionTo and Text fields. Whenever updating the documentation I can now just add a new instance of the nested document type and define from what version this will be available. (This setup makes it possible to add some text in a new part, without having to remove the older text, having them visible simultaneously.)
I have then created a custom function that parses the v URL attribute and shows/hides different parts of the documentation accordingly.
Current code...
@{
foreach (var p in Model.Description)
{
if (MyLogic.CheckVersion(Request.QueryString["v"], (p.VersionFrom as ContentModels.Version)?.VersionName, (p.VersionTo as ContentModels.Version)?.VersionName))
{
@p.Text
}
}
}
This all works fine in my dev environment - static class in /App_Data/MyLogic.cs, with a CheckVersion() method, which I refer in my razor like above. p being of my nested content document type. But when I drop my MyLogic.cs file into the prod environment App_Data folder it never recognizes it and I receive the following error:
CS0103: The name 'MyLogic' does not exist in the current context
I just realized my own mistake - placing the code in the App_Data folder instead of App_Code. Moving the code file to the correct location solved my problem.
Versioning content
Hi!
We've planned to use an Umbraco site for documenting and providing our system users with a User manual. Now I've run into a small problem...
My wish is to be able to send system version, from our system via URL to the Umbraco site, to be able to show the right version of the user manual.
In our system we have a bunch of entities, for example
Carrier
, that are documented in Umbraco, on separate content pages (based on a custom Document Type), with the propertiesTitle
andDescription
.Over different system versions the
Description
property might vary, so I need to be able to modify the description property but would still like to contain the different versions within the same content page; i.e. I want to be able to visit the following two URL's having them show the same content page but with different content.Is this possible?
Hi,
My first thought - and just a suggestion...
Why not create a redirect / rewrite rule that spots any urls with a the url param ?vX.xx
And then redirects to https://v1-12.yoursite.com
That way you can just create entire new sub site (copy the last one!) each time you reversion. Links can be to a generic domain - default you can just keep 302ing to the latest subdomain?
Steve
Hi Steve!
Thank you for your response.
The thing is that only small parts of the documentation will be updated between different system versions, so to make a complete copy seems a bit to much?
My current situation is that I have a document type that defines nested content and have
VersionFrom
,VersionTo
andText
fields. Whenever updating the documentation I can now just add a new instance of the nested document type and define from what version this will be available. (This setup makes it possible to add some text in a new part, without having to remove the older text, having them visible simultaneously.) I have then created a custom function that parses thev
URL attribute and shows/hides different parts of the documentation accordingly.Current code...
This all works fine in my dev environment - static class in
/App_Data/MyLogic.cs
, with aCheckVersion()
method, which I refer in my razor like above.p
being of my nested content document type. But when I drop my MyLogic.cs file into the prod environment App_Data folder it never recognizes it and I receive the following error:What am I missing?
I just realized my own mistake - placing the code in the
App_Data
folder instead ofApp_Code
. Moving the code file to the correct location solved my problem.is working on a reply...