-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from oveleon/feature/logo-url
Feature: LogoUrl and PHP8 + Contao 4.12 compatibility
- Loading branch information
Showing
38 changed files
with
1,597 additions
and
1,346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,258 @@ | ||
# Contao Company Bundle | ||
Allows you to manage company details for one or more companies provided in settings and root pages. Company details stored in settings are used as fallback, if an specific company detail is missing in involved root page. | ||
<h1 align="center">Contao Company Bundle</h1> | ||
<p align="center"><i>The Company Bundle adds company information via Insert-Tags, social media information and a logo module for websites and different website roots.</i></p> | ||
<p align="center"> | ||
<a href="https://www.oveleon.de"><img src="https://img.shields.io/badge/oveleon-maintained-83aa0e?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZ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JRHKSIaYfIm7JRSsvHIyuM/wMorNeEfUMqKnbKwU2TBwpSUSWYWFmSBDKWmWcgwcX2Pvrc5HXfuXL/6zD2P3z2Puedouq5rilG40JPxAuUmeX84tGTkwyXsghOWYQmKoFazExzVDXFIgEeazcPV9TCnzGplRiHMl7KgCWYghy9vQAasMEfkTqQarJ9JFWw0YlhJFv2rUv8tdKiDhTib0eiHQyhOsR2xyjlp0BF5MBELdr6WohE++X6raBOz6PwWCfiCOLzDN8sRGICYyfdrgBA8Q2kmfnzQJirghlw+XZANUQ5qFmHY52R9/9lWCXjBpbRPcaubDhtHsRoOuN1reAO/1H/PpzfdaqrggzOLK7YFD6zPMqeL9at0gwWZuKa0i3hkuZf1E6tteqEZnmCRbZVwxPIOn3V83litaogzbrPuhDOIwbyUd8q8SavBOpl0rnxROadFugkFVoOJAx1h4rRJvw9e2b9u3ACrY9ENAZaD/L/E0aiHMbbfQc3v7bFxWAchqptHAAqN3HQrM0JcsXFohzzexWPYk5N+BBgAix5VyvzRZbwAAAAASUVORK5CYII=" alt="Oveleon"></a> | ||
<a href="https://github.com/oveleon/contao-company-bundle"><img src="https://img.shields.io/badge/license-MIT-83aa0e?style=flat-square"/></a> | ||
<a href="https://packagist.org/packages/oveleon/contao-company-bundle"><img src="https://img.shields.io/packagist/dt/oveleon/contao-company-bundle?color=0A7BBC&style=flat-square"/></a> | ||
</p> | ||
|
||
--- | ||
|
||
> Working with **Contao 4.9** and up to **Contao 4.12** (PHP ^7.4 and PHP 8) | ||
--- | ||
|
||
The company bundle allows you to manage company details for one or more companies provided in the contao settings and website roots. Company details stored in the settings are used as a fallback if specific company details are missing in the involved website roots. | ||
Company details can be displayed dynamically by using the provided company modules (social-media-list & logo) or alternatively by using the provided company insert tags. | ||
You can display company details dynamically simply by using the provided company modules or alternatively by using a company insert tag. | ||
|
||
## Overview | ||
The following company details can be stored in settings and root pages: | ||
|
||
- `Logo` | ||
- `Company name` | ||
- `Street` | ||
- `Postal code` | ||
- `City` | ||
- `State` | ||
- `Country` | ||
- `Phone number` | ||
- `Phone number 2` | ||
- `Fax number` | ||
- `E-mail address` | ||
- `E-mail address 2` | ||
- `Info` | ||
- `Info 2` | ||
- `Social-Media links` | ||
|
||
## Modules | ||
The following frontend modules are provided: | ||
|
||
- `Logo`: Displays the stored company logo | ||
- `Social media list`: Displays stored social media links | ||
+ [Features](#features) | ||
+ [Installation](#installation) | ||
+ [Composer](#via-composer) | ||
+ [Contao Manager](#via-contao-manager) | ||
+ [Setup](#setup) | ||
+ [Company-Details](#setup-company-details) | ||
+ [Logo](#logo-module) | ||
+ [Social-media-list](#social-media-list) | ||
+ [Insert tags](#insert-tags) | ||
+ [Company-details](#company-details) | ||
+ [Additional](#additional) | ||
+ [Front end Modules](#front-end-modules) | ||
+ [Support](#support) | ||
+ [Sponsoring](#sponsoring) | ||
|
||
## Features | ||
|
||
- Compatible with Contao 4.9 and higher versions (PHP 8 Support) | ||
- Easy setup for company details | ||
- All company details can be overwritten within website roots | ||
- Fallback company details | ||
- Insert tags | ||
- Logo module | ||
- Href works with prepend locale and different website roots | ||
- Social media lists | ||
|
||
![](https://www.oveleon.de/share/github-assets/contao-company-bundle/frontend/frontEnd.jpg) | ||
|
||
## Installation | ||
|
||
#### Via composer | ||
``` | ||
composer require oveleon/contao-company-bundle | ||
``` | ||
|
||
#### Via contao-manager | ||
``` | ||
Search for contao company bundle and add it to your extensions. | ||
``` | ||
|
||
After installing the contao-company-bundle, you need to run a **contao install**. | ||
|
||
## Setup | ||
|
||
### Setup company details | ||
|
||
1. Go to `System > Settings` and navigate to the palette: `Company-details` | ||
|
||
![Admin View: Company Details](https://www.oveleon.de/share/github-assets/contao-company-bundle/backend/systemSettings.jpg) | ||
|
||
|
||
2. Type in your company details to be used with insert-tags and save the changes | ||
|
||
|
||
3. Additionally you can select a logo and create multiple social media entries | ||
|
||
|
||
4. If you want to overwrite your company-details for different website roots, go to `Layout > Site structure > Edit page (Root page)` and navigate to the palette: `Company-details`. | ||
Keep in mind that saving these will overwrite the modules and insert-tags for this root page. | ||
|
||
### Logo module | ||
|
||
1. Create the front-end module *Logo* | ||
2. Set up an image size | ||
3. Embed the module within your layout (e.g. header-section) or in your articles | ||
|
||
### Social media list | ||
|
||
1. Create the front-end module *Social media list* | ||
2. Choose a template (Default or nolabel) | ||
3. Embed the module within your articles | ||
4. (Additionally you can choose the template `nolabel` and style them with an icon font) | ||
|
||
|
||
## Insert tags | ||
All company details can be called anywhere by the following insert tags: | ||
|
||
- `{{company::name}}` | ||
- `{{company::street}}` | ||
- `{{company::postal}}` | ||
- `{{company::city}}` | ||
- `{{company::state}}` | ||
- `{{company::country}}` | ||
- `{{company::phone}}` | ||
- `{{company::phone2}}` | ||
- `{{company::fax}}` | ||
- `{{company::email}}` | ||
- `{{company::email2}}` | ||
- `{{company::info}}` | ||
- `{{company::info2}}` | ||
|
||
### Additional insert tags: | ||
|
||
- `{{company::mailto}}`: Outputs a mailto link e.g. `<a href="mailto:my@mail.de">my@mail.de</a>` | ||
- `{{company::mailto2}}`: Outputs a mailto link e.g. `<a href="mailto:my@mail.de">my@mail.de</a>` | ||
- `{{company::tel}}`: Outputs a tel link e.g. `<a href="tel:01234567890">+49 1234 / 56 78 90</a>` | ||
- `{{company::tel2}}`: Outputs a tel link e.g. `<a href="tel:01234567890">+49 1234 / 56 78 90</a>` | ||
- `{{company::address}}`: Outputs the full address | ||
- `{{company::countrycode}}`: Outputs the country code | ||
Your company information can be displayed using following *insert-tags*. | ||
|
||
> For more information on *Insert tags*, please visit the official <a href="https://docs.contao.org/manual/en/article-management/insert-tags/" title="Insert tags :: Contao Manual" target="_blank">Contao documentation</a>. | ||
**Example** | ||
``` | ||
{{company::name}} | ||
{{company::tel}} | ||
``` | ||
|
||
### Company details | ||
|
||
<table> | ||
<tr> | ||
<th colspan="2"><strong>Company details</strong></th> | ||
</tr> | ||
<tr> | ||
<td><strong>Insert tag</strong></td> | ||
<td><strong>Description</strong></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::name}}</td> | ||
<td>Displays the <b><u>company</u></b> name</td> | ||
</tr> | ||
<tr> | ||
<td>{{company::street}}</td> | ||
<td>Displays the <b><u>street</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::postal}}</td> | ||
<td>Displays the <b><u>postal</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::city}}</td> | ||
<td>Displays the <b><u>city</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::state}}</td> | ||
<td>Displays the <b><u>state</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::country}}</td> | ||
<td>Displays the <b><u>country</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::phone}}</td> | ||
<td>Displays <b><u>Phone Number 1</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::phone2}}</td> | ||
<td>Displays <b><u>Phone Number 2</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::fax}}</td> | ||
<td>Displays the <b><u>Fax Number</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::email}}</td> | ||
<td>Displays <b><u>E-mail address 1</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::email2}}</td> | ||
<td>Displays <b><u>E-mail address 2</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::info}}</td> | ||
<td>Displays <b><u>Info 1</u></b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::info2}}</td> | ||
<td>Displays <b><u>Info 2</u></b></td> | ||
</tr> | ||
</table> | ||
|
||
### Additional | ||
|
||
<table> | ||
<tr> | ||
<th colspan="2"><strong>Additional insert-tags</strong></th> | ||
</tr> | ||
<tr> | ||
<td><strong>Insert tag</strong></td> | ||
<td><strong>Description</strong></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::tel}}</td> | ||
<td>Creates a phone link from <i>Phone1</i> | ||
<pre> | ||
<a href="tel:01234567890">0123 / 45 67 890</a> | ||
</pre> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>{{company::tel2}}</td> | ||
<td>Creates a phone link from <i>Phone2</i> | ||
<pre> | ||
<a href="tel:01234567890">0123 / 45 67 890</a> | ||
</pre> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>{{company::mailto}}</td> | ||
<td>Creates a mailto link from <i>E-Mail address 1</i> | ||
<pre> | ||
<a href="mailto:info@oveleon.de">info@oveleon.de</a> | ||
</pre> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>{{company::mailto2}}</td> | ||
<td>Creates a mailto link from <i>E-Mail address 2</i> | ||
<pre> | ||
<a href="mailto:info@oveleon.de">info@oveleon.de</a> | ||
</pre> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>{{company::address}}</td> | ||
<td>Displays the full address: <b>Street, Postal City</b></td> | ||
</tr> | ||
<tr> | ||
<td>{{company::countrycode}}</td> | ||
<td>Displays the ISO 639-1 country code from <i>Country</i></td> | ||
</tr> | ||
</table> | ||
|
||
## Front end modules | ||
|
||
### Logo (Company) | ||
Displays the saved company logo. | ||
|
||
The image for the logo-module is set up within the system or root page settings. | ||
|
||
### Social media list (Company) | ||
Displays the company social media. | ||
|
||
The social media list is set up within the system or root page settings. | ||
|
||
#### Adding custom social media | ||
The social media platforms within the select box are generated from the file: | ||
|
||
> tl_company_socials.xlf | ||
You are able to add new social-media by creating a translation file and uploading them on your server as shown below: | ||
|
||
**Contao root files** | ||
|
||
![Admin View: Adding new socials](https://www.oveleon.de/share/github-assets/contao-company-bundle/backend/filesNewSocials.jpg) | ||
|
||
**Company Settings** | ||
|
||
![Admin View: Socials](https://www.oveleon.de/share/github-assets/contao-company-bundle/backend/newSocials.jpg) | ||
|
||
## Support | ||
> We **only provide support** for **bugs, and feature requests**; please only post issues about these two topics. | ||
> | ||
> If you need help implementing Contao Glossary Bundle or you are just starting out with Contao/CSS/JavaScript or HTML, please contact us on our [website](https://www.oveleon.de/kontakt.html#kontaktformular), | ||
> visit the [Contao Community](https://community.contao.org/) or the [Contao Slack](https://join.slack.com/t/contao/shared_invite/enQtNjUzMjY4MDU0ODM3LWVjYWMzODVkZjM5NjdlNDRiZjk2OTI3OWVkMmQ1YjA0MTQ3YTljMjFjODkwYTllN2NkMDcxMThiNzMzZjZlOGU), | ||
> you will be able to find more help there. | ||
> | ||
> This will help us to keep the issues related to this plugin and solve them faster. | ||
## Sponsoring | ||
|
||
If you find this plugin useful, please consider [sponsoring us](https://github.com/sponsors/oveleon) to help contribute to our time invested and to further development of this and other open source projects. Thank you for your support! - [Oveleon](https://www.oveleon.de). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.