Download the PHP package c975l/pageedit-bundle without Composer

On this page you can find all versions of the php package c975l/pageedit-bundle. 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 pageedit-bundle

PageEditBundle

PageEditBundle does the following:

It is, of course, still possible to modify directly those files with an editor.

This Bundle relies on the use of TinyMce, jQuery and Bootstrap.

PageEditBundle dedicated web page.

PageEditBundle API documentation.

Bundle installation

Step 1: Download the Bundle

Use Composer to install the library

Step 2: Enable the Bundle

Then, enable the bundle by adding them to the list of registered bundles in the app/AppKernel.php file of your project:

Step 3: Configure the Bundle

Check dependencies for their configuration:

For KnpSnappyBundle you can use this configuration if it suits to your needs.

v2.0+ of c975LPageEditBundle uses c975L/ConfigBundle to manage configuration parameters. Use the Route "/pages/config" with the proper user role to modify them.

Upgrading from v1.x? Check UPGRADE.md

If you use Git for version control, you need to add the full path templates/[folderPages] and public/images/[folderPages] in the .gitignore, otherwise all the content will be altered by Git.

Step 4: Enable the Routes

Then, enable the routes by adding them to the app/config/routing.yml file of your project:

Step 5: Link and initialization of TinyMce

It is strongly recommended to use the Override Templates from Third-Party Bundles feature to integrate fully with your site.

For this, simply, create the following structure templates/bundles/c975LPageEditBundle/views/ in your app and then duplicate the file layout.html.twig in it, to override the existing Bundle files, then apply your needed changes, such as language, etc.

In layout.html.twig, it will mainly consist to extend your layout and define specific variables, i.e. :

It is recommended to use Tinymce Cloud version. You will need a free API key. OR you can download and link to your project https://www.tinymce.com/download/.

If you want to keep all the available tools and make no change to Tinymce as it is, you don't need to overwrite tinymceInit.html.twig. You just need to provide, in parameters.yml, your tinymceApiKey (see above) if you use the cloud version and the tinymceLanguage (+ upload the corresponding file on your server under public/vendor/tinymce/[tinymceLanguage].js). Oherwise you need to override tinymceInit.html.twig.

Step 6: Definitions of start and end of template for file saving

When the Twig file is saved, it is concatenated with the content of Resources/views/skeleton.html.twig to obtain the full file.

This file must extends your layout in order to display correctly. It is recommended to NOT override this file, but if you do so, take care to keep {% block pageedit_content %} and {% endblock %} as they are the entry and exit points to defines content.

How to use

The Url to display a page is http://example.com/pages/{page}, the one to edit is http://example.com/pages/modify/{page}, to display a PDF is http://example.com/pages/pdf/{page}.

A toolbar is displayed below the title if user is identified and has the acess rights.

Link to a page, in Twig, can be done by <a href="{{ path('pageedit_display', { 'page': 'slug' }) }}">Title of the page</a>.

The different Routes (naming self-explanatory) available are:

Creation of PDF

PageEditBundle uses KnpSnappyBundle to generates PDF, which itself uses wkhtmltopdf. wkhtmltopdf requires that included files, like stylesheets, are included with an absolute url. But, there is a known problem with SSL, see #3001, which force you to downgrade openssl, like in Gist.

You can avoid this problem by including the whole content of included files, which is what wkhtmltopdf does, in your html output. To integrate them easily, you can, as c975L/SiteBundle does, use c975L/IncludeLibraryBundle with the following code:

Integrate sub-pages

To add sub-pages in sub-folders, simply use a "/" as separator in the Url semantic field.

Homepage specific

The home page can be managed via PageEdit, but as it is called at the root of the website it has a specificity. it's name is "home" and cannot be changed.

Protect specific templates

If you need to protect specific templates (containing lot of Twig tag, Twig variable setting, etc. or if you don't want your final user to be able to modify them, to not break the website), simply put those templates in templates/[folderPages]/protected, they will be displayed as other, and included in the sitemap, but not available for modifications. You just need to encapsulate the content of the template within the skeleton.html.twig.

Use the Twig Extension to automate building menus

You can use the provided Twig Extension folder_content() to easily build menus based on the content of a specific folder, for this use the following code:

Migrating existing files to PageEdit

To migrate existing files, simply move your existing templates in the folder defined in templates/[folderPages] (folderPages has been defined in Step 3 above), access to PageEdit dashboard and do the modifications. The skeleton will be added to new files and old ones will be archived.

You can use the command git rm -r --cached templates/[folderPages] to remove it from Git, if the folder was previously indexed. Don't forget to make a copy of it, if you use Git as versionning system and if you have added this folder in the .gitignore, otherwise your files will be deleted at next commit !

If files have been deleted by Git, simply use the code below:

Create Sitemap

In a console use php bin/console pageedit:createSitemap to create a sitemap-[folderPages].xml in the web folder of your project. You can use a crontab to generate it every day. You can add this file in a sitemap-index.xmlthat groups all your sitemaps or directly use it if you have only one.

If this project help you to reduce time to develop, you can sponsor me via the "Sponsor" button at the top :)


All versions of pageedit-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
c975l/config-bundle Version *
c975l/includelibrary-bundle Version *
c975l/services-bundle Version *
c975l/toolbar-bundle Version *
cocur/slugify Version *
h4cc/wkhtmltopdf-amd64 Version *
knplabs/knp-paginator-bundle Version *
symfony/form Version *
symfony/templating Version *
symfony/translation Version *
twig/intl-extra Version *
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 c975l/pageedit-bundle contains the following files

Loading the files please wait ....