title: How to convert from $this->text to $this->data in MediaWiki?
body: <p>I'm trying to compare the title of a page to a certain value in a skin for MediaWiki. The page  title can be outputted using:</p>
  
  <pre><code>&lt;?php $this-&gt;text('title') ?&gt;
  </code></pre>
  
  <p>This works and will output the page title (in this case "Main Page"), however it will not allow me to compare the value to anything, for example:</p>
  
  <pre><code>&lt;?php if ($this-&gt;text('title') == "Main Page") { echo "You are on the Main Page!"; } ?&gt;
  </code></pre>
  
  <p>This will output "Main Page", not "You are on the Main Page!"</p>
  
  <p>The fix for this would be to use $this->data instead of $this->text, but $this->data('title') is not defined in MediaWiki. How can I convert the output of $this->text to a variable that can be compared without echoing anything to the user?</p>