Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rude-eyes-go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"strapi-plugin-webtools": patch
---

Update webtools search with mainField as key
3 changes: 2 additions & 1 deletion packages/core/server/controllers/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default {

const entriesWithContentType: SearchResult[] = entries.map((entry: DocumentEntry) => ({
...entry,
mainField: entry[mainField],
contentType: uid,
}));

Expand Down Expand Up @@ -88,7 +89,7 @@ export default {
id: entry.id,
documentId: entry.documentId,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
...(mainField ? { [mainField]: entry[mainField] } : {}),
...(mainField ? { mainField: entry[mainField] } : {}),
};
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ slug: /addons/links/custom-field
This addon introduces a new custom field which you can add to your content types. This field can be used in your content types to accommodate internal linking from one page to another.

<img src="/webtools/img/assets/addons/links/link-custom-field.png" alt="Link custom field" />

### This custom field will provide you three options in the advanced settings:
* Set the link to "internal" and now you can search on something like "My first blog post". The field stores a documentId reference, so the link keeps working even if the slug or URL changes.
* Set the link to "external" so you can enter a full url, e.g. https://strapi.io/
* Set the link to "Internal & external links" and have both link options as described above, this is the default value.

<img src="/webtools/img/assets/addons/links/webtools-pro-link-addon-options.png" alt="Link advanced settings" />
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ slug: /addons/links/installation
Complete installation requirements are the exact same as for Strapi itself and can be found in the Strapi documentation.

**Additional Requirements:**
- **Node.js**: Version 18 or higher
- **Node.js**: Version 18.18.2 or higher
- **Strapi**: Version 5.x
- **Webtools**: Version 1.x
:::
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.