Download the PHP package la-haute-societe/craft-page-exporter without Composer

On this page you can find all versions of the php package la-haute-societe/craft-page-exporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-page-exporter

Craft Page Exporter

This plugin allows you to export entries in ZIP format from the control panel. The resulting archive contains a static HTML rendering of the entry along with its images, videos, scripts and styles.

Example of resulting archive: `

Requirements

This plugin requires Craft CMS 3.0.0-RC1 or later.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Page exporter”. Then click on the “Install” button in its modal window.

With Composer

Open your terminal and run the following commands:

`

Usage

Select one or more entries from admin/entries, then select Export from the context menu.

You can also export a single entry from its edit page.

Configuration

You can configure the plugin's behavior from the plugin settings page. Or, for more options, from the configuration file config/craft-page-exporter.php.

Example of (simple) configuration file : ``

Configuration settings

The configuration file can contain the following settings:

inlineStyles

Default: true

Whether external stylesheets must be inlined in the main HTML page inside a style tag.

If true, external stylesheets content will be moved inside a <style> tags.

If false, external stylesheets will be left in external files.

inlineScripts

Default: true

Whether external scripts must be inlined in the main HTML page inside a script tag.

If true, external scripts content will be moved inside a <script> tags.

If false, external scripts will be left in external files.

exportPathFormat

Default: {dirname}/{basename}

Format of the asset path in the ZIP archive. This path is relative to the root of the archive.

It's possible:

The following variables are available:

Variables Values
{filename} filename
{extension} .png (the dot is already contains in the value)
{basename} filename.png
{dirname} /path/to/folder
{hash} c023d66f (hash of the file content)
{year} date('Y')
{month} date('m')
{day} date('d')
{hour} date('H')
{minute} date('i')
{second} date('s')

You can also use any Twig expression like:

`

which will create this path:

\my-folder\2019-05\1\8\18f4a488\MY-IMAGE.png

exportUrlFormat

Default: {dirname}/{basename}

Format of the asset URL in the ZIP archive.

In most cases, this path should correspond to the exportPathFormat setting.

This parameter accepts the same variables as exportPathFormat.

If you plan to place your assets on a CDN for example, you can specify an absolute URL : `

archiveFilename

Default: export

Filename of the ZIP archive.

assetTransformers

Default: []

Collection of transformers that can be used to modify the content or path of assets.

For example, to add a comment at the beginning of an HTML file:

``

If you modify content of child assets you should call the method $asset->updateInitiatorContent() after updating the asset in order to forward the update to his parent.

customSelectors

Child assets are found thanks to XPath expressions.

If you want to add asset to the ZIP archive with custom XPath, for something like:

`

you can add selectors like that:

``

sourcePathTransformer

Default: null

Function used to transform the absolute url of assets to file path.
If not set, paths are defined like that:

``

By default, if asset file is not found, its content will be empty. No error is displayed.

entryContentExtractor

Default: null

If not set, the content of entries is generated with th Craft method Controller::renderTemplate().
You can define a custom callback function which return HTML content from entry:

``

failOnFileNotFound

Default: false

If true an exception will be thrown if an asset file is not found.
Otherwise, no error is displayed and an empty file will be created in the archive.

Register assets explicitly

If some assets cannot be targeted by an XPath expression, for example if you need to generate a JSON containing URLs, you can explicitly register assets from the twig template:

`

Licensing

This plugin is free to try in development environments, but requires payment to be used in production environments. The license fee for this plugin is $29 (license + one year of updates) via the Craft Plugin Store, then $5 per year for updates (optional).

Brought to you by


All versions of craft-page-exporter with dependencies

PHP Build Version
Package Version
Requires ext-dom Version *
ext-json Version *
ext-zip Version *
craftcms/cms Version ^4.0.0
symfony/dom-crawler Version ^3.3.0
nystudio107/craft-plugin-vite Version ^4.0.0
php Version ^8.0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package la-haute-societe/craft-page-exporter contains the following files

Loading the files please wait ....