PHP code example of matrixcreate / contentiq-craft-import
1. Go to this page and download the library: Download matrixcreate/contentiq-craft-import library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
matrixcreate / contentiq-craft-import example snippets
return [
'section' => 'pages', // Entry section handle
'entryType' => 'pages', // Entry type handle
'assetVolume' => 'images', // Asset volume for imported images
'assetFolder' => 'contentiq', // Folder within the volume
'assetFolderStrategy' => 'flat', // 'flat' (default) | 'sitemap' — see docs/assets.md
'documentVolume' => 'documents', // Volume for non-image files[] (e.g. PDFs)
// 'allowPrivateAssetUrls' => true, // LOCAL DEV ONLY — bypasses the SSRF guard for a
// loopback-resolving dev domain; inert unless devMode
// is also true. See docs/assets.md.
// 'maxVideoBytes' => 200 * 1024 * 1024, // Download cap for video files (Text & Media video); images stay at 25 MiB
// 'maxHeroVideoBytes' => 50 * 1024 * 1024, // Per-file download cap for a Video-style hero's videos; Desktop over it = Text & Image hero, Mobile over it = dropped
'matrixField' => 'contentBlocks',
'seoField' => 'seo',
// Hero carousel handles (nested inside the 'hero' ContentBlock) — only if your fork named them differently:
// 'heroMediaModeField' => 'heroMediaMode',
// 'heroCarouselDesktopField' => 'heroCarouselDesktopImages',
// 'heroCarouselMobileField' => 'heroCarouselMobileImages',
// Hero Video-style handles — only if your fork named them differently:
// 'heroDesktopVideoField' => 'desktopVideo',
// 'heroMobileVideoField' => 'mobileVideo',
// 'heroDesktopPosterField' => 'desktopPosterFrame',
// 'heroMobilePosterField' => 'mobilePosterFrame',
'postDate' => ['pages' => true, 'collections' => true], // document.original_publication_date -> Craft postDate
'redirects' => ['enabled' => true, 'httpCode' => 301], // document.legacy_url -> Retour static redirects (