This topic contains 4 replies, has 2 voices, and was last updated by Madhur 8 years, 2 months ago.
- Topic
Hi,
Wish you all a very happy new year.
I have created a custom entity using bundles. The Grid, Update, Create and Delete is working fine. But when I want to view the record, it is giving me this weird error:
Variable “entity” does not exist in OroUIBundle:actions:view.html.twig at line 15
Now I have no clue as to why this error is occurring. My view.html.twig looks like this:
{% extends 'OroUIBundle:actions:view.html.twig' %}
{% import 'OroUIBundle::macros.html.twig' as UI %}
{% block navButtons %}
{% if resource_granted('EDIT', partindex) %}
{{ UI.editButton({
'path' : path('partindex.partindex_update', { 'id': partindex.id }),
'entity_label': 'PartIndex'|trans
}) }}
{% endif %}{% if resource_granted('DELETE', partindex) %}
{{ UI.deleteButton({
'dataUrl': path('partindex_api_delete_partindex', {'id': partindex.id}),
'dataRedirect': path('partindex.partindex_index'),
'aCss': 'no-hash remove-button',
'id': 'btn-remove-partindex',
'dataId': partindex.id,
'entity_label': 'PartIndex'|trans,
}) }}
{% endif %}
{% endblock navButtons %}{% block content_data %}
{% set data %}
<div class="widget-content">
<div class="row-fluid form-horizontal">
<div class="responsive-block">
{{ UI.renderProperty('Code'|trans, partindex.partindexcode) }}
{{ UI.renderProperty('Label'|trans, partindex.partindexlabel) }}
</div>
</div>
</div>
{% endset %}
{% set dataBlocks = [
{
'title': 'Data'|trans,
'class': 'active',
'subblocks': [
{ 'data' : [data] }
]
}
] %}{% set id = 'partindexView' %}
{% set data = { 'dataBlocks': dataBlocks } %}
{{ parent() }}
{% endblock content_data %}
Can you please tell me what I am doing wrong?
Thanks and Regards,
Madhur
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.