Ideas for Arc XP

Export Themes 2 blocks

It would be helpful to have the ability to import Themes 2 blocks into custom blocks. For example, if you wanted to create a headline-ad block which wraps the ads-block and applies custom positioning and scrolling logic, you might import the ads-block like:

import AdBlock from '@wpmedia/ads-block';

Currently this is impossible, and yields an error resembling:

Module not found: Error: Can't resolve '@wpmedia/ads-block' in '/opt/engine/bundle/src/components/features/headline-ad'

Per ACS, this functionality doesn't currently exist in Themes 2. Interestingly, it did exist in Themes 1: My organization had a custom block which depended on this behavior, and were forced to fork the ads-block when migrating to Themes 2.

Exporting OOTB blocks for import from custom blocks would add significant value to Themes.

  • Kyle Haas
  • May 29 2024
  • Needs more information
  • Attach files
  • Kyle Haas commented
    19 Jul 05:51pm

    Apologies for the delayed response.


    So unfortunately, we've moved past this being useful for us in that use-case: we forked your ads-block, rather than wait for an export.

    The general ability of importing themes blocks could be hypothetically useful for us in the future, but we don't have any more use-cases lined up.

  • Admin
    Denise Rivera commented
    3 Jun 09:39pm

    Hi Kyle, thank you for submitting this idea. I apologize that this is no longer supported. The ads-block was the single block that exported itself in v1, and while this doesn't align with our new architecture, what we have considered is converting the ads block into a component which would provide more flexibility for you to build and customize on top of the component to suit your organization's needs. Could you confirm if that approach would meet your use case?