madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

BE-Template #28

Closed Munsio closed 9 years ago

Munsio commented 9 years ago

Hi,

It would be great to define an special BE-Template or use an default one (only with field title etc.) and not to parse the whole element.

Parsing complex elements could lead into backend issues.

ausi commented 9 years ago

You could add something like this at the top of your template:

<?php
    if (TL_MODE === 'BE') {
        echo $this->headline;
        return;
    }
?>
Munsio commented 9 years ago

Sure but i think this solution is a little bit "mäh"

Why not using the be wildcard template as default and a template in the same folder suffixed like the config file but with _be for special be templates?

ausi commented 9 years ago

I added the option beTemplate:

<?php
return array(
    //...
    'beTemplate' => 'my_be_template',
    'fields' => array(
        //...
    ),
);
zonky2 commented 3 years ago

pls add beTemplate to the docs https://rocksolidthemes.com/de/contao/plugins/custom-content-elements/dokumentation

ausi commented 3 years ago

pls add beTemplate to the docs

Done.