We can fix the branch template experience editor by using below config changes.
sitecorePath - change the branch template folder path
folder need to create by using template -
/sitecore/templates/Foundation/JavaScript Services/App |
<app role:require="Standalone or ContentManagement" name="branchTemplateApp"
filesystemPath="/dist"
sitecorePath="/sitecore/templates/Branches/Newbranch"
useLanguageSpecificLayout="true"
graphQLEndpoint="/api/branchTemplateApp"
inherits="defaults" />
role:require="Standalone or ContentManagement": This attribute specifies the roles required to access the app. In this case, it indicates that users need to have either the "Standalone" or "ContentManagement" role to interact with the app.
name="branchTemplateApp": This attribute assigns a name to the app, which likely helps identify it within the Sitecore solution.
filesystemPath="/dist": Indicates the path in the filesystem where the app's files are located. In this case, it's pointing to the "/dist" directory.
sitecorePath="/sitecore/templates/Branches/Newbranch": Specifies the Sitecore path where the branch template is located. It's pointing to the specific location within the Sitecore content tree where the template "Newbranch" exists.
useLanguageSpecificLayout="true": When set to true, this attribute indicates that the app uses language-specific layouts. This can be essential for multilingual sites where different languages have their own layout definitions.
graphQLEndpoint="/api/branchTemplateApp": Defines the GraphQL endpoint used by the app. GraphQL is often utilized in Sitecore JSS for querying data. This endpoint seems specific to the "branchTemplateApp."
inherits="defaults": This might refer to inheriting default settings or configurations for this app from some predefined defaults.
This configuration appears to be defining an app within Sitecore JSS for handling branch templates ("Newbranch") within the Sitecore content tree. It's setting up access roles, filesystem paths, Sitecore paths, GraphQL endpoints, and other properties necessary for the app's proper functioning in the Experience Editor.
By ensuring that these attributes are correctly configured, it likely resolves issues related to the Experience Editor when working with branch templates in Sitecore JSS.
Comments
Post a Comment