Updates DefaultUrlProvider so that hieararchy of nodes that are variant and invariant still generate URLs correctly
This commit is contained in:
@@ -326,19 +326,23 @@
|
||||
|
||||
//get the selected variant and build the additional published variants
|
||||
saveModel.publishVariations = [];
|
||||
_.each(displayModel.variants,
|
||||
function (d) {
|
||||
//set the selected variant if this is current
|
||||
if (d.current === true) {
|
||||
saveModel.languageId = d.language.id;
|
||||
}
|
||||
if (d.publish === true) {
|
||||
saveModel.publishVariations.push({
|
||||
languageId: d.language.id,
|
||||
segment: d.segment
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//if there's more than 1 variant than we need to set the language and include the variants to publish
|
||||
if (displayModel.variants.length > 1) {
|
||||
_.each(displayModel.variants,
|
||||
function (d) {
|
||||
//set the selected variant if this is current
|
||||
if (d.current === true) {
|
||||
saveModel.languageId = d.language.id;
|
||||
}
|
||||
if (d.publish === true) {
|
||||
saveModel.publishVariations.push({
|
||||
languageId: d.language.id,
|
||||
segment: d.segment
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var propExpireDate = displayModel.removeDate;
|
||||
var propReleaseDate = displayModel.releaseDate;
|
||||
|
||||
Reference in New Issue
Block a user