pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

How to parse JSON to index.html?

Open nickcarterney opened this issue 1 year ago • 7 comments

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 avatar Nov 28 '24 13:11 nickcarterney

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.

m2-assistant[bot] avatar Nov 28 '24 13:11 m2-assistant[bot]

@magento-admin @magently I am working on this

nickcarterney avatar Dec 09 '24 11:12 nickcarterney

@magento I am working on this

nickcarterney avatar Dec 09 '24 11:12 nickcarterney

Hi @nickcarterney! :wave: 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.

m2-assistant[bot] avatar Dec 09 '24 11:12 m2-assistant[bot]

@magento add to contributors team

nickcarterney avatar Dec 09 '24 11:12 nickcarterney

Hi @nickcarterney! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.

m2-assistant[bot] avatar Dec 09 '24 11:12 m2-assistant[bot]

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

nickcarterney avatar Dec 09 '24 11:12 nickcarterney

@adobe export issue to JIRA project PWA as Bug

glo82145 avatar Dec 03 '25 06:12 glo82145

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/PWA-3633 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Dec 03 '25 06:12 github-jira-sync-bot