Hello,
I’m developing a custom theme for a site that has a different base URL for tags (topics).
I updated frontity.settings.js to include:
tagBase: "topics"
in the source
json section.
I also have a custom handler to return me a list of all these tags:
export const allTopics = {
name: "allTopics",
priority: 10,
pattern: "all-topics",
func: async ({ route, state, libraries }) => {
const response = await libraries.source.api.get({
endpoint: "tags",
params: {
_fields: ["id", "name", "excerpt", "link", "slug", "count"],
per_page: 100,
orderby: "name",
order: "asc",
},
});
const items = await response.json();
const currentPageData = state.source.data[route];
Object.assign(currentPageData, state.source.data[route], {
items,
});
},
};
I created a component that uses this handler and displays the list of topics fine.
When I click into a topic using the slug as the URL from that topic list page, I see the 404 page.
But when I directly navigate to it (if I just refresh the browser at the page for an individual topic) the post component shows up properly with the title of the tag.
I’m having a hard time figuring out why the page is not found when navigated to from the list, but comes up when hit directly.
Any help would be great!
Thanks,
Jayme