Site icon Hip-Hop Website Design and Development

Is it attainable to vary redirect template by a shortcode?

I’ve added a redirect for my plugin in init:

add_rewrite_rule( 'metropolis/([a-zA-Z]+)/?$', 
'wp-content/plugins/csv-to-html/templates/csvtohtmlpage_core.php?metropolis=$1' ); 

After I go to <website>/metropolis/london the $_GET['city'] comprises london.
After I go to <website>/metropolis/manchester the $_GET['manchester'] comprises manchester and reveals the the anticipate template (wp-content/plugins/csv-to-html/templates/csvtohtmlpage_core.php).
and so forth..

This works as anticipated…

Is it attainable to vary redirect template (wp-content/plugins/csv-to-html/templates/csvtohtmlpage_core.php) by a shortcode? , eg..
[csvhtml_create template="template2"] which for instance would use wp-content/plugins/csv-to-html/templates/templates2.php as a substitute.

I’ve examined to place add_rewrite_rule() the place the precise shortcode (when it triggers) with out success so my guess the reply is not any, however I need it confirmed 🙂