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 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
  • 1 View
  • 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 use Symfony 1.4 and Doctrine 1.2. I installed plugin http://www.symfony-project.org/plugins/sfCkPlugin if i add
Ex. in Symfony 1: http://www.symfony-project.org/jobeet/1_2/Doctrine/en/06#chapter_06_custom_configuration Where should I store global data, which file?
I'm trying to use the following technique described on symfony.com : http://symfony.com/doc/current/cookbook/testing/http_authentication.html in an
how to convert this file to yml? <container xmlns=http://symfony.com/schema/dic/services xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd> <services> <service
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
When I try to clone from git git clone http://github.com/symfony/symfony.git d:/www/a/vendor/symfony I get an
yikes i have forgotten but am following: http://www.symfony-project.org/getting-started/1_4/en/03-Symfony-Installation i have a jobeet directory and
Using the guide http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html i'm trying to customize error message, but i've a problem:
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

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.