用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/umbraco/Umbraco-CMS-Backoffice-Skills --skill umbraco-search-result-item命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Run tests from skill examples and generate a report (project)
Validate links and references in SKILL.md files using deterministic scripts
Umbraco backoffice extension customisation - complete working examples showing how extension types combine
正在显示 SKILL.md
基于 SOC 职业分类
| name | umbraco-search-result-item |
| description | Implement search result items in Umbraco backoffice using official docs |
| version | 1.0.0 |
| location | managed |
| allowed-tools | Read, Write, Edit, WebFetch |
A Search Result Item is a custom component that controls how individual search results are displayed in the backoffice search results. It allows you to customize the visual presentation of search results for specific entity types - showing additional information, custom icons, badges, or any other visual elements.
Always fetch the latest docs before implementing:
umbraco-umbraco-elementimport type { ManifestSearchResultItem } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestSearchResultItem = {
type: 'searchResultItem',
alias: 'My.SearchResultItem',
name: 'My Search Result Item',
element: () => import('./my-search-result-item.element.js'),
forEntityTypes: ['my-entity'],
};
export const manifests = [manifest];
import { html, css, customElement, property } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import type { UmbSearchResultItemModel } from '@umbraco-cms/backoffice/search';
@customElement('my-search-result-item')
export class MySearchResultItemElement extends UmbLitElement {
@property({ type: Object })
item?: UmbSearchResultItemModel;
render() {
if (!this.item) return html``;
return html`
<a href=${this.item.href} class="result-item">
<umb-icon name=${this.item.icon ?? 'icon-document'}></umb-icon>
<div class=>
;
}
styles = css`;
}
;
{
{
: ;
}
}
// If your search provider returns extended data
interface MySearchResultModel extends UmbSearchResultItemModel {
description?: string;
status?: string;
updatedDate?: string;
}
@customElement('my-search-result-item')
export class MySearchResultItemElement extends UmbLitElement {
@property({ type: Object })
item?: MySearchResultModel;
render() {
if (!this.item) return html``;
return html`
<a href=${this.item.href} class="result-item">
<umb-icon name=${this.item.icon ?? 'icon-document'}></umb-icon>
<div class="content">
< =>;
}
}
const manifest: ManifestSearchResultItem = {
type: 'searchResultItem',
alias: 'My.SearchResultItem.Custom',
name: 'Custom Search Result Item',
element: () => import('./custom-result-item.element.js'),
forEntityTypes: ['my-entity-a', 'my-entity-b', 'my-entity-c'],
};
// For customizing results in picker search (content pickers, media pickers, etc.)
import type { ManifestPickerSearchResultItem } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestPickerSearchResultItem = {
type: 'pickerSearchResultItem',
alias: 'My.PickerSearchResultItem',
name: 'My Picker Search Result',
element: () => import('./my-picker-result.element.js'),
forEntityTypes: ['my-entity'],
};
| Property | Description |
|---|---|
entityType | The entity type identifier |
unique | Unique identifier for the item |
name | Display name |
icon | Icon name (optional) |
href | URL to navigate when clicked |
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.