[SPA/React] Render component with wcmmode=disabled | Adobe Higher Education
Skip to main content
June 28, 2019
Beantwortet

[SPA/React] Render component with wcmmode=disabled

  • June 28, 2019
  • 1 Antwort
  • 1702 Ansichten

Hi, community.

I'm creating SPA site using @adobe/cq-react-editable-components. Is it possible to include some specific component with wcmmode=disabled?

In sightly we can do it like this:

<div data-sly-resource="${'path/to/resource' @ wcmmode='disabled'}"></div>

Can I have something similar in React? Like this:

import {ResponsiveGrid} from '@adobe/cq-react-editable-components';

/* ... */

class App extends React.Component {

  /* ... */

  render() {

    /* ... */

    return (

      <>

        <Header /* ... */>

          <ResponsiveGrid wcmmode="disabled" />

        </Header>

        <Layout>

          <ResponsiveGrid /* ... */ />

        </Layout>

        <Footer /* ... */ >

          <ResponsiveGrid wcmmode="disabled" />

        </Footer>

      </>

    );

  }

}

Regards,

Ivan

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von Pablo_Larrosa-R

Hi Ivan Andrianovsky​, hope it's not too late.

In the customheaderlibs.html file you defined a meta property cq:wcmmode.

You can read that value in react like the following

Regards

1 Antwort

Pablo_Larrosa-R
Level 2
September 17, 2019

Hi Ivan Andrianovsky​, hope it's not too late.

In the customheaderlibs.html file you defined a meta property cq:wcmmode.

You can read that value in react like the following

Regards

Level 2
February 11, 2022

HI @pablo_larrosa-r 
It seems that the quoted text is not appearing anymore. Could this please be reposted?
Thanks!