Login messages being wrapped in <h2> - does anyone know where markup control for this is found?

Permalink
Hi There,

I've found and overridden the markup for validation errors (/helpers/validation/error.php) but have noticed there's a bunch of messages that don't use this markup.

e.g. If you try to view a member page while not logged in, the message "You must sign in order to access this page!" displays wrapped in <h2> tags.

Does anyone know where the messages and their markup are stored?

Cheers

Ben

 
mkly replied on at Permalink Best Answer Reply
mkly
I'm not sure what operating system you use but in Linux I use grep to find this stuff sometimes.
grep -Rn "You must sign in order to access this page" *

from the concrete directory. It helps me to find stuff like this since there isn't a ton of documentation on this type of stuff. I'm pretty sure they have one for windows and osx too. Not sure if it is the same and there is probably something easier to use too.

That said this message is specific to the profile page passing to the login page. In a couple of profile page controllers they set $intro_msg to that message with
$this->set('intro_msg', t('You must sign in order to access this page!'));

before rendering the login page with
$this->render('/login');

Then
/concrete/single_pages/login.php

displays the message with
<?php   if (isset($intro_msg)) { ?>
<h2><?php  echo $intro_msg?></h2>
<?php   } ?>

around line 144

Hope thats a little helpful and I envy your commitment to your markup.

EDIT: I should add that one of the big perks of using render as opposed to redirect in this case is that you can pass values to it like above.
cmscss replied on at Permalink Reply
Thanks mate - good tip about the searching too.