Tài nguyên tệp kê khai Trình kích hoạt trang chủ
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cấu hình tài nguyên dùng để xác định trang chủ của tiện ích bổ sung Google Workspace
kích hoạt.
HomepageTrigger
Cấu hình tệp kê khai tiện ích bổ sung Google Workspace cho trình kích hoạt trang chủ.
Bạn có thể xác định các điều kiện kích hoạt trang chủ trong tài nguyên addOns.common.homepageTrigger
hoặc tài nguyên của từng ứng dụng lưu trữ.
Nếu được xác định và bật, trình kích hoạt trang chủ của một ứng dụng lưu trữ sẽ ghi đè trình kích hoạt trang chủ được xác định trong addOns.common.homepageTrigger
.
Hãy xem phần Cấu hình trang chủ để biết thêm thông tin chi tiết.
Biểu diễn dưới dạng JSON |
{
"enabled": boolean,
"runFunction": string
} |
Trường |
enabled |
boolean
Trang chủ (không theo bối cảnh) có được bật cho ứng dụng lưu trữ này hay không. Giá trị mặc định là true .
|
runFunction |
string
Tên của hàm để chạy trình kích hoạt này. Nếu được chỉ định, bạn phải triển khai hàm này để tạo và trả về một mảng gồm một hoặc nhiều đối tượng Card để hiển thị dưới dạng trang chủ của tiện ích bổ sung này trong ứng dụng lưu trữ này.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eHomepage triggers define the configuration for Google Workspace Add-on homepages, letting you control card display and functionality.\u003c/p\u003e\n"],["\u003cp\u003eThese triggers can be set globally or for specific host applications, with host-specific settings taking precedence.\u003c/p\u003e\n"],["\u003cp\u003eHomepage triggers are configured using the \u003ccode\u003eenabled\u003c/code\u003e and \u003ccode\u003erunFunction\u003c/code\u003e fields within the add-on's manifest file.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erunFunction\u003c/code\u003e field points to a function that constructs and returns \u003ccode\u003eCard\u003c/code\u003e objects to populate the add-on's homepage.\u003c/p\u003e\n"]]],[],null,["# HomepageTrigger manifest resource\n\nThe resource configuration that is used to define\n[Google Workspace add-on](/workspace/add-ons/concepts/types#g_suite_add-ons)\n[homepage triggers](/workspace/add-ons/concepts/homepages#homepage_configuration).\n\nHomepageTrigger\n---------------\n\nThe Google Workspace add-on manifest configuration for\n[homepage triggers](/workspace/add-ons/concepts/homepages#homepage_configuration).\n\nHomepage triggers can be defined in the\n[`addOns.common.homepageTrigger`](/apps-script/manifest/addons#Common.FIELDS.homepageTrigger)\nresource or the resources of the individual\n[host applications](/workspace/add-ons/guides/glossary#host_or_host_application).\nThe homepage trigger of a host application, if defined and enabled, overrides\nthe homepage trigger defined in\n[`addOns.common.homepageTrigger`](/apps-script/manifest/addons#Common.FIELDS.homepageTrigger).\n\nSee [Homepage configuration](/workspace/add-ons/concepts/homepages#homepage_configuration)\nfor more details.\n\n| JSON representation |\n|-----------------------------------------------------------|\n| ```text { \"enabled\": boolean, \"runFunction\": string } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enabled` | `boolean` Whether or not homepage (non-contextual) cards are enabled for this host application. Defaults to `true`. |\n| `runFunction` | `string` The name of the function to run this trigger fires. If specified, you must implement this function to build and return an array of one or more [`Card`](/apps-script/reference/card-service/card) objects for display as this add-on's homepage in this host application. |"]]