Last active
June 11, 2016 05:42
-
-
Save pupi1985/1578f39e2ef38fa2d065 to your computer and use it in GitHub Desktop.
Answer to question http://www.question2answer.org/qa/37144/how-change-recent-questions-and-answers-text-css-class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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