Skip to content

Conversation

@michalJakubis
Copy link
Contributor

@michalJakubis michalJakubis commented Nov 13, 2025

This pull request updates the CodeSnippetTagHelperComponent to improve how it determines the website channel and page content type before rendering code snippets. The changes ensure that code snippets are only processed when a valid website channel is present, and refactor how the content type ID is retrieved. Additionally, the project version is incremented.

Rendering logic improvements

  • Added a dependency on IWebsiteChannelContext to CodeSnippetTagHelperComponent and updated its constructor to require this parameter. [1] [2]
  • Changed the code snippet processing logic to check for a valid website channel using websiteChannelContext.WebsiteChannelID before attempting to retrieve the web page data context and content type ID. This prevents unnecessary processing when the channel is invalid.
  • Refactored content type ID retrieval to only occur if the web page data context is successfully retrieved, improving reliability and clarity.

Version update

  • Bumped the project version prefix from 5.0.1 to 5.0.2 in Directory.Build.props.

@michalJakubis michalJakubis requested a review from a team as a code owner November 13, 2025 07:30
@michalJakubis michalJakubis merged commit d43a1ba into main Nov 13, 2025
2 checks passed
@michalJakubis michalJakubis deleted the bump-version-to-5.0.2 branch November 13, 2025 07:36
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.

2 participants