I am building a plugin that takes variables from the url's query string and renders out the appropriate category ids, but when I tried testing out a category that I know exists and place the plugin tag inside the category parameters.
{exp:channel:entries channel="products" category="{exp:test_plugin}"}
{title}
{/exp:channel:entries}
It outputs some hash:
{exp:channel:entries channel="product" category="M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr" dynamic="no"}
But when I place the plugin tag outside of the category parameter it prints out the number. Here's my plugin so far.
class test_plugin {
public $return_data = "";
public $c;
public $s;
public $m;
public $t;
public function __construct($tagdata = NULL){
$this->return_data = 28;
}
function type_name(){
return $this->t;
}
public function usage()
{
ob_start();
?>
:)
<?php
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
}
}
How would I get it to print out the actual category number?