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

  • Home
  • SEARCH
  • 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 6131855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:01:46+00:00 2026-05-23T17:01:46+00:00

symfony: http://www.symfony-project.org pjax: https://github.com/defunkt/jquery-pjax Hi all, I’m trying to use pjax in symfony in

  • 0

symfony: http://www.symfony-project.org
pjax: https://github.com/defunkt/jquery-pjax

Hi all,

I’m trying to use pjax in symfony in order to speed up our website (we will be able to keep header and footer static most of the time, and also avoid reloading lots of css/js and other files).

I have no problem with ajax or symfony, but I want to know if there is a better way:

  1. Is it a good idea to use postExecute to return the html code back right away without sf going to the template at all
  2. If so, can I somehow write this only once for all modules? I imagine that I can do:

    mySfActions extends sfActions

    moduleActions extends mySfActions

I wonder if there is a better way?
3. Is there a way to get the current layout name (defined in the module’s view.yml) within the controller/action?

  • 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-05-23T17:01:46+00:00Added an answer on May 23, 2026 at 5:01 pm

    Question 1: Don’t use post-execute like that. If you need to return html from an ajax call in your action then your action should return like this:

    return $this->renderText("<p>Your html result.</p>");
    

    This will skip the template call.

    Question 2: That is correct. You have written the best way to write a function once and have it available to all module actions.

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

Sidebar

Related Questions

The official website seems only provided some tutorial on how to use: http://www.symfony-project.org But
I found this: http://www.symfony-zone.com/wordpress/2008/12/13/use-routing-to-server-localized-and-dynamic-javascript/ But I saw that it has already been built into
http://www.doctrine-project.org/documentation/manual/1_0/ru/behaviors:core-behaviors:softdelete You are required to enable DQL callbacks in order for all executed queries
I have a symfony project which, because of DNS issues, is http://<project-name>/ locally, but
I'm trying to do an Outer Join in Symfony. Here's the bit of code
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python)
I have a site built with Symfony 1.2. I'm trying to integrate Wordpress 2.8.4
I have been trying to upload my SYmfony plugin for some time but I
I have generated the Backend Application for the Symfony(1.4 and ORM Propel) project, in
With Symfony's Action Security if a user has not been identified he will be

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.