1

Which variable I have to use in main layout.php to get current module name?

2
  • Do you mean module name? There isnt any definitive model name because there can be many models in use at any given time. Commented Feb 24, 2011 at 3:07
  • :) I mean "module". For ex: project.com/module-name. I have to define this "module-name" value Commented Feb 24, 2011 at 3:13

1 Answer 1

5

$sf_context

http://www.symfony-project.org/gentle-introduction/1_4/en/07-Inside-the-View-Layer#chapter_07_sub_template_shortcuts

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah, I got it myself. Actually must use: $modulename = $sf_context->getModuleName();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.