Skip to content

Instantly share code, notes, and snippets.

@pupi1985
Last active June 11, 2016 05:42
Show Gist options
  • Save pupi1985/1578f39e2ef38fa2d065 to your computer and use it in GitHub Desktop.
Save pupi1985/1578f39e2ef38fa2d065 to your computer and use it in GitHub Desktop.
function page_title_error()
{
$favorite=@$this->content['favorite'];
if (isset($favorite))
$this->output('<form '.$favorite['form_tags'].'>');
echo 'Template: ' . $this->template . ' ';
switch ($this->template) {
case 'qa':
$class = ' class="recent-questions"';
break;
case 'some-other-template-you-want':
$class = ' class="another-class-to-apply-css"';
break;
default:
$class = '';
}
$tag = 'h1';
$this->output('<' . $tag . $class . '>');
$this->favorite();
$this->title();
$this->output('</' . $tag . '>');
if (isset($this->content['error']))
$this->error(@$this->content['error']);
if (isset($favorite)) {
$this->form_hidden_elements(@$favorite['form_hidden']);
$this->output('</form>');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment