hi, is it possible to assign a page template on the fly when a page is loaded?
let´s say i have a page with code to list all categories available in my wp blog. there´s also code that counts the number of categories ($catsavailable).
now if there is three categories i want page-template-3.php to be assigned to that page, if the output is four categories page-template-4.php and so on.
does it make sense to hack the function get_page_template or template-loader.php? but how would these get the info of $catsavailable?
thanks in advance,