Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // A simple function to change the content type of the current page
- //
- // Ported from a UDT written by RolfTj @ https://www.cmscanbesimple.org/blog/create-dynamic-sitemaps-and-robots-txt#pages
- // Place in /assets/plugins/function.content_type.php
- // Use i param for shorthand
- // Use 'type' param to set type
- //
- // Examples:
- // {content_type type='text/plain'}
- // {content_type type='application/manifest+json'}
- function smarty_function_content_type($params, &$smarty) {
- $content_type = get_parameter_value($params,'type');
- if ($content_type != '') {
- cmsms()->set_content_type($content_type);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement