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 6135399
In Process

The Archive Base Latest Questions

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

I wanted to create my own template for the admin-generator, so I’ve followed a

  • 0

I wanted to create my own template for the admin-generator,
so I’ve followed a tutorial and i’m now making my own template based on the “admin” template.
But I defined a new variable called “rubrique” in the file “newAction” and when I tried to call it in the template “newSuccess.php” I obtained this error:

Notice: Undefined variable: rubrique in C:\wamp\www\PhpProject2\data\generator\sfDoctrineModule\immo\template\templates\newSuccess.php on line

  • newAction:

    public function executeNew(sfWebRequest $request)
    {
    $this->rubrique =12;

    }

  • NewSuccess.php:

    echo $rubrique;

ps: i’ve simplified the code

Does anybody have a solution?? sorry for my bad english :p

  • 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:28:29+00:00Added an answer on May 23, 2026 at 5:28 pm

    Sorry about the delay.

    Okay… I think I might know your problem. I spent a chunk of time modifying the Admin Generator for a project, but that was over 1.5 years ago so I had to refresh my memory.

    I’m taking an educated guess by saying you’re echoing your variable in data\generator\sfDoctrineModule\immo\template\templates\newSuccess.php like so:

    <?php echo $rubrique; ?>
    

    These files are actually compiled first and then executed. In the first pass the var $rubrique is not available. Try this instead:

    [?php echo $rubrique; ?]
    

    Note the square brackets. I think the files are run through a regex or str_replace or something; I can’t recall exactly.

    Try this, then clear the cache ./symfony cc which is important. It should work now.

    Alternatively, override the template and put it in your module’s dir and use it with normal php tags.

    Hope this helps 🙂

    Edit:

    You might know this already, but if you want to override the file as described above it will be available in the cache: cache\frontend\dev\modules\{$MODULE_NAME}\templates\newAction.php, where {$MODULE_NAME} will be the name of your module prepended by the word auto; e.g: autoUser.

    This overrides the cached version. Copy this into your module’s template dir and edit to your heart’s content.

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

Sidebar

Related Questions

I wanted to create my own Python exception class, like this: class MyException(BaseException): def
If I wanted to create my own relational database with a modern language to
I wanted to create a new property on a table in my model.. Basically
I wanted to create some subdirectories inside my blob. But it is not working
I wanted to create jquery plugin & started off creating a sample jquery plugin...But
I have a problem over here. You see, I wanted to create my own
I am trying to create my own std::string wrapper to extend its functionality. But
I just wanted to create my own simple document using the agility pack so
Im new to OpenGL ES and wanted to create a bunch of triangles that
Im new to OpenGL ES and wanted to create a bunch of triangles that

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.