{"id":30420774,"url":"https://github.com/skybrud/skybrud.umbraco.borgerdk","last_synced_at":"2026-05-20T05:32:16.980Z","repository":{"id":44818490,"uuid":"14331949","full_name":"skybrud/Skybrud.Umbraco.BorgerDk","owner":"skybrud","description":"Umbraco package for integration with the Borger.dk web service.","archived":false,"fork":false,"pushed_at":"2024-01-08T22:20:53.000Z","size":2856,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":12,"default_branch":"v4/main","last_synced_at":"2025-07-22T09:10:05.820Z","etag":null,"topics":["borgerdk","csharp","dotnet","limbo","limbo-integrations","package","skybrud","skybrud-integrations","umbraco","umbraco-package","umbraco-v7","umbraco-v8"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skybrud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-11-12T12:48:52.000Z","updated_at":"2024-02-06T15:06:26.000Z","dependencies_parsed_at":"2024-01-08T22:50:24.117Z","dependency_job_id":null,"html_url":"https://github.com/skybrud/Skybrud.Umbraco.BorgerDk","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/skybrud/Skybrud.Umbraco.BorgerDk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2FSkybrud.Umbraco.BorgerDk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2FSkybrud.Umbraco.BorgerDk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2FSkybrud.Umbraco.BorgerDk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2FSkybrud.Umbraco.BorgerDk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skybrud","download_url":"https://codeload.github.com/skybrud/Skybrud.Umbraco.BorgerDk/tar.gz/refs/heads/v4/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2FSkybrud.Umbraco.BorgerDk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271606605,"owners_count":24788981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["borgerdk","csharp","dotnet","limbo","limbo-integrations","package","skybrud","skybrud-integrations","umbraco","umbraco-package","umbraco-v7","umbraco-v8"],"created_at":"2025-08-22T08:20:08.413Z","updated_at":"2026-05-20T05:32:16.944Z","avatar_url":"https://github.com/skybrud.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Skybrud.Umbraco.BorgerDk\n========================\n\nThis repository covers the integration between our [**Skybrud.Integrations.BorgerDk**](https://github.com/skybrud/Skybrud.Integrations.BorgerDk) package and Umbraco. This gives editors the option to insert Borger.dk articles as part of their content in their own pages in Umbraco.\n\nThe `v4/main` branch (the one you're viewing now) contains the Umbraco 9 implementation, while an older implementations for Umbraco 8, Umbraco 7 and Umbraco 6 can be found in the [`v3/main`](https://github.com/skybrud/Skybrud.Umbraco.BorgerDk/tree/v3/main), [`v2/main`](https://github.com/skybrud/Skybrud.Umbraco.BorgerDk/tree/v2/main) and [`v1/main`](https://github.com/skybrud/Skybrud.Umbraco.BorgerDk/tree/v1/main) branches respectively.\n\n## List of contents\n\n* [Installation](#installation)\n* [Setup](#setup)\n    * [In the grid](#in-the-grid)\n    * [As a property](#as-a-property)\n* [Municipalities](#municipalities)\n\n## Installation\n\n1. [**NuGet Package**][NuGetPackageUrl]  \nInstall this NuGet package in your Visual Studio project. Makes updating easy.\n\n2. [**ZIP file**][GitHubReleaseUrl]  \nManually unzip and move files to the root directory of your website.\n\n## Setup\n\n### In the grid\n\nThis package comes with the option to insert an article as a control in the Umbraco Grid. The control however needs a bit of configuration, so you have to add the editor manually.\n\nThe editor requires you to specify the `municipality` to be used, since each munipality has the option for adding specific content to a given article. If you don't know the municipality ID, you can find it [in this list](#municipalities). `630` as shown in the examples below is *Vejle Kommune*.\n\nIf you wish to add the editor in a custom `package.manifest` file, it could look like this:\n\n```JSON\n{\n    \"gridEditors\": [\n        {\n            \"name\": \"Borger.dk\",\n            \"alias\": \"skybrud.borgerdk\",\n            \"view\": \"/App_Plugins/Skybrud.BorgerDk/Views/BorgerDkGridEditor.html\",\n            \"icon\": \"icon-school\",\n            \"config\": { \n                \"municipality\": 630\n            }\n        }\n    ]\n}\n```\n\nYou can also just add the editor to the global configuration file located at `~/config/grid.editors.config.js`. In that case you could just append the JSON for the editor to the array of editors:\n\n```JSON\n{\n    \"name\": \"Borger.dk\",\n    \"alias\": \"skybrud.borgerdk\",\n    \"view\": \"/App_Plugins/Skybrud.BorgerDk/Views/BorgerDkGridEditor.html\",\n    \"icon\": \"icon-school\",\n    \"config\": { \n        \"municipality\": 630\n    }\n}\n```\n\n#### Usage\n\nIf using our [Skybrud.Umbraco.GridData-package](https://github.com/skybrud/Skybrud.Umbraco.GridData) for showing the grid on your website, you can use the `BorgerDkGridControlValue` class (which inherits from `BorgerDkArticleSelection` used in the property editor) for the value of the Borger.dk grid control.\n\nIn order for the grid package to return a strongly typed model, you should use the default `skybrud.borgerdk` editor alias as shown in the JSON examples above, or specify a custom alias either ending with `.borgerdk` or containing `.borgerdk.` - eg. `mysite.borgerdk` or `mysite.borgerdk.main`. If you use another editor alias, you should add your own grid converter to handle the model.\n\nIf you're using our grid package, and already have a reference to the control holding the Borger.dk article, you can access the value shown in the Razor partial view example below (where `Model` is the control):\n\n```C#\n@using Skybrud.Umbraco.BorgerDk.Grid.Values\n@using Skybrud.Umbraco.BorgerDk.Models.Cached\n@inherits UmbracoViewPage\u003cSkybrud.Umbraco.GridData.GridControl\u003e\n              \n@{\n\n    BorgerDkGridControlValue value = Model.GetValue\u003cBorgerDkGridControlValue\u003e();\n\n    if (!value.HasSelection || !value.Article.Exists) { return; }\n\n    foreach (BorgerDkCachedMicroArticle microArticle in value.MicroArticles) {\n        \u003cdiv class=\"BorgerDkMicroArticle\"\u003e\n            \u003ch2\u003e@microArticle.Title\u003c/h2\u003e\n            @Html.Raw(microArticle.Content)\n        \u003c/div\u003e\n    }\n\n    foreach (BorgerDkCachedTextElement block in value.Blocks) {\n        \u003cdiv class=\"BorgerDkText\"\u003e\n            \u003ch3\u003e@block.Title\u003c/h3\u003e\n            @Html.Raw(block.Content)\n        \u003c/div\u003e\n    }\n\n}\n```\n\nThe `value.HasSelection` property indicates whether the value has an article selection. It is necessary to check this since an editor might insert the Borger.dk grid control on a page, and then save the page without actually selecting an article, leaving the selection empty.\n\nThe `value.Article` property is a reference to the cached article. When fetching an article from the Borger.dk webservice through Umbraco, it will automatically be saved/cached on the disk for later use. The `value.Article.Exists` then indicates whether the article is actually saved on the disk. If not, the example just returns since we don't have any content to show.\n\nAlso in the example, the properties `value.MicroArticles` and `value.Blocks` will only contain the micro articles and text elements that the editor has selected in Umbraco, while all micro articles and text elements of the article can be accessed through `value.Article.MicroArticles` and `value.Article.Blocks`.\n\n### As a property\n\nThis will be supported in the future ;)\n\n## Municipalities\n\n| ID | Name |\n|----|------|\n|580|Aabenraa Kommune|\n|851|Aalborg Kommune|\n|751|Aarhus Kommune|\n|492|Ærø Kommune|\n|165|Albertslund Kommune|\n|201|Allerød Kommune|\n|420|Assens Kommune|\n|151|Ballerup Kommune|\n|530|Billund Kommune|\n|400|Bornholms Regionskommune|\n|153|Brøndby Kommune|\n|810|Brønderslev Kommune|\n|155|Dragør Kommune|\n|240|Egedal Kommune|\n|561|Esbjerg Kommune|\n|430|Faaborg-Midtfyn Kommune|\n|563|Fanø Kommune|\n|710|Favrskov Kommune|\n|320|Faxe Kommune|\n|210|Fredensborg Kommune|\n|607|Fredericia Kommune|\n|147|Frederiksberg Kommune|\n|813|Frederikshavn Kommune|\n|250|Frederikssund Kommune|\n|190|Furesø Kommune|\n|157|Gentofte Kommune|\n|159|Gladsaxe Kommune|\n|161|Glostrup Kommune|\n|253|Greve Kommune|\n|270|Gribskov Kommune|\n|376|Guldborgsund Kommune|\n|510|Haderslev Kommune|\n|260|Halsnæs Kommune|\n|766|Hedensted Kommune|\n|217|Helsingør Kommune|\n|163|Herlev Kommune|\n|657|Herning Kommune|\n|219|Hillerød Kommune|\n|860|Hjørring Kommune|\n|169|Høje-Taastrup Kommune|\n|316|Holbæk Kommune|\n|661|Holstebro Kommune|\n|615|Horsens Kommune|\n|223|Hørsholm Kommune|\n|167|Hvidovre Kommune|\n|756|Ikast-Brande Kommune|\n|183|Ishøj Kommune|\n|849|Jammerbugt Kommune|\n|326|Kalundborg Kommune|\n|440|Kerteminde Kommune|\n|101|Københavns Kommune|\n|259|Køge Kommune|\n|621|Kolding Kommune|\n|825|Læsø Kommune|\n|482|Langeland Kommune|\n|350|Lejre Kommune|\n|665|Lemvig Kommune|\n|360|Lolland Kommune|\n|173|Lyngby-Taarbæk Kommune|\n|846|Mariagerfjord Kommune|\n|410|Middelfart Kommune|\n|773|Morsø Kommune|\n|370|Næstved Kommune|\n|707|Norddjurs Kommune|\n|480|Nordfyns Kommune|\n|450|Nyborg Kommune|\n|727|Odder Kommune|\n|461|Odense Kommune|\n|306|Odsherred Kommune|\n|730|Randers Kommune|\n|840|Rebild Kommune|\n|760|Ringkøbing-Skjern Kommune|\n|329|Ringsted Kommune|\n|175|Rødovre Kommune|\n|265|Roskilde Kommune|\n|230|Rudersdal Kommune|\n|741|Samsø Kommune|\n|740|Silkeborg Kommune|\n|746|Skanderborg Kommune|\n|779|Skive Kommune|\n|330|Slagelse Kommune|\n|269|Solrød Kommune|\n|540|Sønderborg Kommune|\n|340|Sorø Kommune|\n|336|Stevns Kommune|\n|671|Struer Kommune|\n|479|Svendborg Kommune|\n|706|Syddjurs Kommune|\n|185|Tårnby Kommune|\n|787|Thisted Kommune|\n|550|Tønder Kommune|\n|187|Vallensbæk Kommune|\n|573|Varde Kommune|\n|575|Vejen Kommune|\n|630|Vejle Kommune|\n|820|Vesthimmerlands Kommune|\n|791|Viborg Kommune|\n|390|Vordingborg Kommune|\n\n\n\n\n[NuGetPackageUrl]: https://www.nuget.org/packages/Skybrud.Umbraco.BorgerDk\n[UmbracoPackageUrl]: http://our.umbraco.org/projects/website-utilities/skybrud.umbraco.borgerdk\n[GitHubReleaseUrl]: https://github.com/skybrud/Skybrud.Umbraco.BorgerDk/releases/latest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskybrud%2Fskybrud.umbraco.borgerdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskybrud%2Fskybrud.umbraco.borgerdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskybrud%2Fskybrud.umbraco.borgerdk/lists"}