Symfony Tips: Use the referer to customize messages on Symfony

On symfony is a good idea to use the referer to costomize some messages, like this one below.

in template, you have to make a condition:

<?php if( $sf_request->getReferer() != '' ): ?>
  The page <?php echo $sf_request->getParameter('page'); ?> was changed.
<?php else: ?>
  The page <?php echo $sf_request->getParameter('page'); ?> not exists, check if you type correctly. 
<?php endif; ?>

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.