feat(content-management): expose SEO fields in Static Pages editor
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
ContentPage.seo (title/description/keywords/canonical/ogTitle/ogDescription/ ogImage) was already modeled and serialized to bootstrap JSON but had no editable UI. Added updateSeo() to the component and a translated SEO fieldset using app-form-field/app-input. Added seoSection/seoTitle/seoDescription/ seoKeywords/seoCanonical/seoOgTitle/seoOgDescription/seoOgImage translation keys to en/ru/hy and the Translations type. Verified in browser at /edit/static-pages: SEO section renders with translated labels for all three mock pages.
This commit is contained in:
@@ -71,6 +71,31 @@
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
|
||||
<h4 class="page-card__subheading">{{ 'builder.seoSection' | translate }}</h4>
|
||||
<div class="editor-grid two">
|
||||
<app-form-field [label]="'builder.seoTitle' | translate">
|
||||
<app-input [ngModel]="page.seo?.title || ''" (ngModelChange)="updateSeo(page.id, { title: $event })" />
|
||||
</app-form-field>
|
||||
<app-form-field [label]="'builder.seoDescription' | translate">
|
||||
<app-input [ngModel]="page.seo?.description || ''" (ngModelChange)="updateSeo(page.id, { description: $event })" />
|
||||
</app-form-field>
|
||||
<app-form-field [label]="'builder.seoKeywords' | translate">
|
||||
<app-input [ngModel]="page.seo?.keywords || ''" (ngModelChange)="updateSeo(page.id, { keywords: $event })" />
|
||||
</app-form-field>
|
||||
<app-form-field [label]="'builder.seoCanonical' | translate">
|
||||
<app-input [ngModel]="page.seo?.canonical || ''" (ngModelChange)="updateSeo(page.id, { canonical: $event })" />
|
||||
</app-form-field>
|
||||
<app-form-field [label]="'builder.seoOgTitle' | translate">
|
||||
<app-input [ngModel]="page.seo?.ogTitle || ''" (ngModelChange)="updateSeo(page.id, { ogTitle: $event })" />
|
||||
</app-form-field>
|
||||
<app-form-field [label]="'builder.seoOgDescription' | translate">
|
||||
<app-input [ngModel]="page.seo?.ogDescription || ''" (ngModelChange)="updateSeo(page.id, { ogDescription: $event })" />
|
||||
</app-form-field>
|
||||
<app-form-field [label]="'builder.seoOgImage' | translate">
|
||||
<app-input [ngModel]="page.seo?.ogImage || ''" (ngModelChange)="updateSeo(page.id, { ogImage: $event })" />
|
||||
</app-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</app-card>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user