Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8692467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:19:04+00:00 2026-06-13T00:19:04+00:00

Where should partial templates files be placed in Phalcon? Is there any config for

  • 0

Where should partial templates files be placed in Phalcon? Is there any config for that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:19:04+00:00Added an answer on June 13, 2026 at 12:19 am

    Partials

    They have to be under the view folder. An example structure is below:

    views/
        about/      <- AboutController
        index/      <- IndexController
        contact/    <- ContactController
        layouts/    <- Templates to override or add to the current template process
        partials/   <- (name can be anything) where you store your partials
    

    If you want your partials to be in a specific subfolder then you will need to define it in the partial argument

    $this->partial('partials/header');
    

    The above will look for a file in the views/partials folder by the name of header.phtml or header.volt or whatever your registered view engine is. (phtml is the default).

    NOTE You are not restricted to use a folder to add your partials in. They can happily be in the views folder on their own. You can organize your views folder the way you see fit.

    The layouts folder under views contains templates that can be used anywhere in the flow of the application but are not partials. Think of them as addons to your current template flow.

    A layout called main template would be invoked in the controller layer as such:

    $this->view->setTemplateAfter('main');
    

    If you navigate to say /about/index, Phalcon will pick the views\index.volt file, then the layouts\main.volt and finally the views\about\index.volt

    NOTE Again I am using the volt example above – it could easily be phtml or any other View engine you use (phtml is the default).

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

why should i use a component instead of an action that renders a partial?
As most C++ programmers should know, partial template specialization of free functions is disallowed.
Im learning Mockito and in chapter 16 they say you should not use partial
Belong to this article Jquery Partial View What should i do when i want
What query should I execute in MySQL database to get a result containing partial
I have two objects that I want to render side by side. There is
I want to test that my controller action is rendering a partial. I've poked
Or am I misunderstanding something? Partial lives in: app/views/admin/command_templates/_fillerup.html.erb This spec passes (there is
How to disable element prefix in asp.net mvc2 template? Should I use Partial Control
I have an issue with something that should be very simple databinding scenario. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.