That's it. Change freq and priority are added automatically with default values until changed in the actual content page.
Of Note:
The script will return nothing unless a template is assigned to the content.
n.TemplateId > 0
Which makes perfect sense, however please note that if you have content as children which DO have templates associated BUT the parent doesn't, the recurse ability will stop, and you will need to amend the script to check of children with templates first.
Ameded to pickup recursive Change Frequency & Priority
Made a slight change so that Change Frequency & Priority were enabled by default.
Steps:
Add two new properties at the root or similar on your site. Change Frequency & Priority
...with the values stated in the release notes. I used a standard dropdown list.
In Umbraco set the default values in that high level node.
Next...
Update the Sitemap template cshtml file with this.
}
That's it. Change freq and priority are added automatically with default values until changed in the actual content page.
Of Note:
The script will return nothing unless a template is assigned to the content.
Which makes perfect sense, however please note that if you have content as children which DO have templates associated BUT the parent doesn't, the recurse ability will stop, and you will need to amend the script to check of children with templates first.
many thanks for writing.
is working on a reply...