Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to parse JSON to index.html? #4356

Open
nickcarterney opened this issue Nov 28, 2024 · 7 comments
Open

How to parse JSON to index.html? #4356

nickcarterney opened this issue Nov 28, 2024 · 7 comments
Labels
documentation This pertains to documentation.

Comments

@nickcarterney
Copy link

nickcarterney commented Nov 28, 2024

I can get data from GraphQL in upward..yml , but It's writing

===> Hellow ===> {{cmsPageResult > json}}

I want to print the JSON data to {{messageContent}}

veniaAppShell:
    resolver: inline
    inline:
        status:
            resolver: inline
            inline: 200
        headers:
            resolver: inline
            inline:
                content-type:
                    inline: text/html
                cache-control:
                    inline: s-maxage=60
        body:
            resolver: template
            engine: mustache
            provide:
                pageType: veniaPageType.data
                pageTypeNonce: veniaPageTypeNonce.nonce
                webpackChunks: veniaWebpackChunks.scripts
                **textHellow:
                    resolver: inline
                    inline: "Hellow"
                messageContent: 
                  resolver: inline
                  inline: '{{cmsPageResult > json}}' # ???? I want cmsPageResult to show as JSON in index.html**
            template:
                resolver: file
                file:
                    resolver: inline
                    inline: './index.html'


                    
cmsPageResult:
  url: 
    resolver: inline
    inline: "DOMAIN/graphql"
  query:
    resolver: inline
    inline: |
      query {
        storeConfig {
          header_logo_src
          logo_alt
          logo_height
          logo_width
          store_code
        }
      }
     
      

<!DOCTYPE html>
<html>
    <head>
        
    </head>
    <body class="bg-body text-base text-colorDefault overflow-x-hidden">
        **===> {{textHellow}}
        ===> {{messageContent}}**
    </body>
</html>

@nickcarterney nickcarterney added the documentation This pertains to documentation. label Nov 28, 2024
Copy link

m2-assistant bot commented Nov 28, 2024

Hi @nickcarterney. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

@nickcarterney
Copy link
Author

@magento-admin
@magently I am working on this

@nickcarterney
Copy link
Author

@magento I am working on this

Copy link

m2-assistant bot commented Dec 9, 2024

Hi @nickcarterney! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@nickcarterney
Copy link
Author

@magento add to contributors team

Copy link

m2-assistant bot commented Dec 9, 2024

Hi @nickcarterney! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and add your comment one more time.

@nickcarterney
Copy link
Author

Can anyone help me? I cannot find any documents about this issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This pertains to documentation.
Projects
None yet
Development

No branches or pull requests

1 participant