Skip to content

Commit

Permalink
Added: Added copyright and license version documentation and expanded…
Browse files Browse the repository at this point in the history
… custom bundle content_field template override documentation
  • Loading branch information
brookinsconsulting committed May 5, 2015
1 parent 53e9443 commit 864a8d0
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
16 changes: 16 additions & 0 deletions COPYRIGHT
@@ -0,0 +1,16 @@
COPYRIGHT NOTICE: Copyright (C) 2014-2015 Netgen
SOFTWARE LICENSE: GNU General Public License v2.0
NOTICE: >
This program is free software; you can redistribute it and/or
modify it under the terms of version 2.0 of the GNU General
Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of version 2.0 of the GNU General
Public License along with this program; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
12 changes: 9 additions & 3 deletions README.md
Expand Up @@ -3,11 +3,17 @@ Netgen Enhanced Selection Bundle

Netgen Enhanced Selection Bundle is an eZ Publish 5 bundle that provides a field type that reimplements `ezselection` field type.

This repository represents eZ Publish 5 rewrite of the original eZ Publish 4 extension called `enhancedselection2`. However, eZ Publish 4 extension is still required to populate field type through the admin interface.
This repository represents eZ Publish 5 rewrite of the original eZ Publish 4 extension called `enhancedselection2`.

However, The eZ Publish 4 extension is still required to populate field type through the admin interface.

If you install this bundle by composer the eZ Publish 4 extension is installed automatically but not activated in settings.

License and installation instructions
-------------------------------------

[License](LICENSE)
* [Copyright](COPYRIGHT)

* [License](LICENSE)

[Installation instructions](Resources/doc/INSTALL.md)
* [Installation instructions](Resources/doc/INSTALL.md)
23 changes: 23 additions & 0 deletions Resources/doc/INSTALL.md
Expand Up @@ -65,3 +65,26 @@ Add the following template code into your template:
Replace the text: "selection" with your own content type field identifier as needed.

Save these additions to your custom template and clear caches as required.

Custom usage
------------------

### Custom content_field template override

If you wish to override the content_field template for the fieldtype provided by this bundle you must do the following within your own custom bundle.

If you wish to see a complete, tested example of the code changes required, one has been provided by Brookins Consulting based on this extension within the [BCPageLayoutOverrideTestBundle](https://github.com/brookinsconsulting/BCPageLayoutOverrideTestBundle/commit/e48f57387a3b88c5869300d64e9ff3702eb37a67)

#### General requirements of a content_field template override bundle

* Create a DependencyInjection/YourCustomTemplateOverrideExtension.php class implementing the PrependExtensionInterface class. Remember to load the following config file from within your own bundle within this class's prepend method code.

* Create a config file override in `Resources/config/ezpublish.yml` (within your own custom bundle) and populate it with the settings required in the field_templates settings block to override the template.

* It is very important that you set the priority variable in the above changes to a value larger than the default priority used within the NetgenEnhancedSelectionBundle. The current default is 10 meaning your custom bundle template priority should be larger than 10, say for example 100.

* You can also create the config settings within `ezpublish/config/ezpublish.yml` if you prefer or require a global settings override instead of a bundle settings override configuration.

* Then create a copy of the default `sckenhancedselection_content_field.html.twig` template into your own activated custom bundle, customize template as needed.

* Clear caches as required

0 comments on commit 864a8d0

Please sign in to comment.