3

Im making a plugin and have come to the stage where im making an edit form, for the plugin.

I would like the layout to look like this, with 2 columns and tabs above the left column.

craft entry layout

My, question is what is the best way to achive this? currently im using extending _layouts/cp in my template, the page look like this.

enter image description here

thanks for your help

2

It doesn't appear there is an easy way to do this by extending that template. If you take a look at the template templates/entries/_edit.html you will see how the create/edit entry screen creates this view. It is extending _layouts/cp, but it's overriding the main Twig block to do some custom stuff. You can include the tabs in your main block like so:

{% block main %}
<div class="item" data-position="left" data-min-colspan="2" data-max-colspan="3">
    <div id="fields" class="pane">
        {% include "_includes/tabs" %}
    </div>
</div>
{% endblock %}
| improve this answer | |
  • yes you want the .pane and .grid .item classes. – Luke Holder Jan 25 '15 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.