Ich konnte das Problem jetzt so lösen, wie Du vorgeschlagen hast - in dem konkreten Fall war es sogar schlauer, Fallunterscheidungen im CE Template zu machen.
Danke für das Feedback.
Ein Override wäre m.M.n. durchaus begrüßenswert

[COLOR=#333333][FONT=Monaco][SIZE=11px] [COLOR=#878787]<?php[/COLOR] [COLOR=#197020]// CC CE-attribute object[/COLOR] [COLOR=#8735a5]$objAttribute[/COLOR] [COLOR=#000000]=[/COLOR] [COLOR=#8735a5]$entry[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]field[/COLOR]([COLOR=#dd2400]'ce_widget_1'[/COLOR])[COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]attribute[/COLOR](); [COLOR=#197020]// CE object[/COLOR] [COLOR=#8735a5]$objCE[/COLOR] [COLOR=#000000]=[/COLOR] \PCT\CustomElements\Core\CustomElementFactory[COLOR=#000000]::[/COLOR][COLOR=#3f6e7d]findById[/COLOR]( [COLOR=#8735a5]$objAttribute[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]get[/COLOR]([COLOR=#dd2400]'include_item'[/COLOR]) ); [COLOR=#0045aa]if[/COLOR]( [COLOR=#8735a5]$objCE[/COLOR] ) { [COLOR=#197020]// assign new template and prepare CE for rendering in CC[/COLOR] [COLOR=#8735a5]$objCE[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]set[/COLOR]([COLOR=#dd2400]'template'[/COLOR],[COLOR=#dd2400]'customelement_ce_widget_1'[/COLOR]); [COLOR=#8735a5]$objCE[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]setGenericAttribute[/COLOR]( [COLOR=#8735a5]$objAttribute[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]get[/COLOR]([COLOR=#dd2400]'id'[/COLOR]) ); [COLOR=#8735a5]$objCE[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]setOrigin[/COLOR]( [COLOR=#8735a5]$objAttribute[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]getOrigin[/COLOR]() ); [COLOR=#0045aa]echo[/COLOR] [COLOR=#8735a5]$objCE[/COLOR][COLOR=#000000]->[/COLOR][COLOR=#3f6e7d]render[/COLOR](); } [COLOR=#878787]?[/COLOR][COLOR=#878787]>[/COLOR] [/SIZE][/FONT][/COLOR]
<?php if($entry->field('ce_widget')->value()): ?>
<?php echo $entry->field('ce_widget')->html() ?>
<?php endif; ?>
<?php if($entry->field('ce_widget')->value()): ?>
<?php echo $entry->field('ce_widget')->html('customelement_hyperlink_extended_custom') ?>
<?php endif; ?>
Einen Kommentar schreiben: