diff --git a/lms/lms/doctype/lms_course/lms_course.json b/lms/lms/doctype/lms_course/lms_course.json index f2e4ce4a..5121ef27 100644 --- a/lms/lms/doctype/lms_course/lms_course.json +++ b/lms/lms/doctype/lms_course/lms_course.json @@ -44,7 +44,9 @@ "pricing_section", "paid_certificate", "currency", - "price_certificate" + "price_certificate", + "website_meta_section", + "meta_image" ], "fields": [ { @@ -235,6 +237,16 @@ { "fieldname": "column_break_26", "fieldtype": "Column Break" + }, + { + "fieldname": "website_meta_section", + "fieldtype": "Section Break", + "label": "Website Meta" + }, + { + "fieldname": "meta_image", + "fieldtype": "Attach Image", + "label": "Meta Image" } ], "is_published_field": "published", @@ -261,7 +273,7 @@ } ], "make_attachments_public": 1, - "modified": "2022-09-14 13:26:53.153822", + "modified": "2023-01-03 16:38:35.237691", "modified_by": "Administrator", "module": "LMS", "name": "LMS Course", diff --git a/lms/www/courses/course.py b/lms/www/courses/course.py index d9404ed5..488ab30b 100644 --- a/lms/www/courses/course.py +++ b/lms/www/courses/course.py @@ -57,6 +57,7 @@ def set_course_context(context, course_name): "currency", "max_attempts", "duration", + "meta_image" ], as_dict=True, ) @@ -98,8 +99,8 @@ def set_course_context(context, course_name): context.is_user_interested = get_user_interest(context.course.name) context.metatags = { - "title": course.title, - "image": course.image, + "name": course.title, + "image": course.meta_image or course.image, "description": course.short_introduction, "keywords": course.title, }