2

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.

yemanda
  • 49
  • 10
Aman Garg
  • 3,122
  • 4
  • 24
  • 32

2 Answers2

3

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.

yemanda
  • 49
  • 10
0

I also came with the updated answer.

There could be different layout for any view. You just need to define the layout same as the class name. That's It. !

app/view/layouts/test.volt

or

app/view/layouts/test.html
Aman Garg
  • 3,122
  • 4
  • 24
  • 32