Skip to content

wip#255

Closed
GiangNT95 wants to merge 1 commit intomainfrom
user/gint/add-get-content-by-key
Closed

wip#255
GiangNT95 wants to merge 1 commit intomainfrom
user/gint/add-get-content-by-key

Conversation

@GiangNT95
Copy link
Copy Markdown
Contributor

No description provided.

@GiangNT95 GiangNT95 requested a review from TRomesh March 5, 2026 06:09
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 5, 2026

CLA assistant check
All committers have signed the CLA.

};
const { contentTypeName, damEnabled } =
await this.getContentMetaData(input);
async getContent<T = any>(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer keeping getContentByPath as it is, since this will be a breaking change. I think we can introduce a separate function getContentByKey.

Also don't we get the locale from the path like /en/home?. do we have to pass the locale as a param?

  const articles = await client.getContent({
      path: '/articles/my-article',
      locale: 'nl'
    });

maybe we can do something like this.

  const articles = await client.getContent({
      path: '/en/articles/my-article',
    });

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. we can split this function. about the locale, I think it will make more sense when we add another parameter (locale) to the function.

@GiangNT95 GiangNT95 closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants