Chuyển tới nội dung chính

Thiết lập template

Template là một tenant có sẵn được đánh dấu làm bản mẫu. Khi khách signup với template đó, site mới được clone từ nó. Tenant nguồn phải còn đó.

Vào Waas → Templates (/wp-admin/admin.php?page=grabwp-tenancy-waas-templates).

Danh sách template

Thanh phụ trên màn hình này: Templates | Tags | Tag Groups | Bulk.

Cột danh sách: Template Name, Slug, Source Tenant, Tags, Price, Active, Order, Actions.

Bước 1: Tạo tenant nguồn​

  1. Vào Tenancy → Add New (/wp-admin/admin.php?page=grabwp-tenancy-create)
  2. Tạo tenant trên platform domain, ví dụ template-starter.yoursaas.com
  3. Mở wp-admin của tenant đó và đặt theme, trang, menu cùng nội dung demo mà mọi bản sao sẽ bắt đầu từ đó

Bước 2: Đăng ký template​

  1. Vào Waas → Templates
  2. Bấm Add New

Khi sửa, tiêu đề là Edit Template và nút lưu là Update Template. Khi thêm, nút lưu là Save as Template. Back to Templates về danh sách.

Sửa template

TrườngGhi chú
Source TenantChỉ lúc thêm. Bắt buộc. Không hiện khi sửa.
Template NameBắt buộc. Tiêu đề gallery.
SlugBắt buộc. Chữ thường, số và dấu gạch ngang.
TagsChọn tag, hoặc theo manage tags.
Allowed PlansBỏ chọn để dành cho mọi plan. Chọn plan để giới hạn template. Plan free được ghi Free tier.
PricePhí thêm cho template này. 0 là không có phí template.
Discount PriceGiá thấp hơn, tùy chọn. 0 là không có giá giảm.
DescriptionĐoạn chữ cho gallery.
ThumbnailSelect từ media library, hoặc dán URL ảnh. Remove xóa. Placeholder: Image URL or select from media.
ActiveShow in signup form
Sort OrderSố nhỏ hơn hiện trước

Bấm Save as Template hoặc Update Template. Thông báo thành công: Template saved.

Rebuild Index trên danh sách viết lại file index template. Dùng khi gallery và danh sách không khớp. Thông báo thành công: Templates index rebuilt.

Bước 3: Tags​

Tag lọc gallery. Mở Tags (/wp-admin/admin.php?page=grabwp-tenancy-waas-tags).

Tags

Bấm Add New. Các trường:

TrườngGhi chú
SlugChỉ chữ thường, số, dấu gạch ngang
LabelTên hiện trong gallery và trong bộ chọn tag của template
GroupTag group mà tag này thuộc về
IconẢnh nhỏ. Select hoặc Remove. Dùng làm chỉ báo feature.
ImageẢnh lớn hơn, tùy chọn
Sort OrderThứ tự trong group
ActiveShow in tag selectors

Danh sách lọc theo group và tìm bằng Search Tags.

Bước 4: Tag Groups​

Mở Tag Groups (/wp-admin/admin.php?page=grabwp-tenancy-waas-tags-group).

Tag Groups

Khi chưa lưu group tùy chỉnh, WaaS dùng các group: Style, Industry, Features, Page Builder, Base Theme, Status và Other.

Bấm Add New để thêm group. Trường: Slug, Label, Sort Order.

Group nào hiện dạng pill hay dropdown do thuộc tính shortcode filter-tags của template browser, hoặc control block Pill filter groups (filter-tags). Xem Shortcode Reference.

Bước 5: Bulk CSV​

Mở Bulk (/wp-admin/admin.php?page=grabwp-tenancy-waas-bulk).

Bulk Templates

  1. Bấm Download templates CSV để xuất template hiện có
  2. Sửa file. Bắt buộc có hàng header. Thứ tự cột không quan trọng. Mỗi hàng cần tenant_id, name và slug.
  3. Chọn Source: Upload file hoặc Paste CSV text
  4. Bật Overwrite nếu muốn Overwrite existing templates with the same tenant_id
  5. Đặt Missing tags: Skip missing (drop unknown tag slugs) hoặc Create missing (add to the "other" tag group)
  6. Bấm Import CSV

Các cột hiện trên trang: tenant_id, name, slug, category, tags, allowed_plans, price, discount_price, is_active, sort_order, description, thumbnail_url.

tags và allowed_plans phân tách bằng dấu | (business|portfolio). is_active là 1 hoặc 0.

Kiểm tra​

  1. Dòng template đang Active
  2. Trang templates ở frontend liệt kê nó
  3. Tag bạn gán hiện trên dòng

Tiếp theo: Set Up Frontend Pages