tabsphalconphalcon-routing

How to show the tab in phalcon


I have set of code of tutorial INVO as pre the Phanlcon Official documentation. I just want to customize the code as per my need, So I wrote some code to prepare a fresh Module. I created the below files that are needed to create the full module

app/controllers/AbcController.php
app/model/Abc.php
app/forms/AbcForm.php
app/view/index.volt
app/view/edit.volt
app/view/search.volt
app/view/new.volt

After creating all these file, I am able to runt he module,but In this particular module I am not able to see the tabs having the links. I think I am missing something, Help me out.


Solution

  • I face the same problem recently, and even the solution is not there in the official documentation of Phalcon.

    I came with the solution take reference from another module. There is one file missing in your Code structure that is layout file.

    For any module you need to define a layout at least. You have to create a file as below.

    app/view/layouts/abc.volt
    

    In this you have to put the code according to your need that where you want to show the content where center or left align.

    {{ elements.getTabs() }}

    <div align="center">
        {{ content() }}
    </div>
    

    Here {{ elements.getTabs() }} is used to show the tab. Hope you will get the solution.