Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

Problem including subtemplates from virtual templates: workaround included


 
Prev Previous Post   Next Post Next
  #1  
Old Jul 24, 2013, 08:22 AM
marklevine
 
41 posts · Jun 2010
Problem including subtemplates from virtual templates: workaround included

I have seen past threads about the difficulty to include physical subtemplates from within virtual main templates and I believe that this feature remains broken in Montezuma 1.1.9.

Why would you do this? One simple example it to call something like strtoupper(). My client's design requires the_author() to be displayed in uppercase. To support this, I created a tiny subtemplate called "author_to_uppercase.php" but when I tried to include it in my virtual main template, the call failed.

There is a previous patch for this problem for version 1.1.6. Only one third of that patch (with modification) is needed in 1.1.9. You must edit montezuma/includes/get_whitelist.php and add:

Code:
'bfa_get_template_part' => array( 
	'type' => 'function',
	'examples' => array(
			"<?php bfa_get_template_part('name-of-sub-template', ''); ?>" 
					=> 'Including custom sub templates in a main template - Note: the second parameter is reserved',
			),
	'info' => '	',
),
into $wl_global array. Note 'info' *must* have a value. The original patch omitted this.
 

Bookmarks

Tags
bfa_get_template_part, get_whitelist, subtemplate, template, virtual



Similar Threads
Thread Thread Starter Forum Replies Last Post
PATCH 113-07: allow use of bfa_get_template_part() in Virtual templates juggledad New Versions & Updates 0 Mar 20, 2013 10:40 AM
[SOLVED] Need help differentiating virtual and physical templates Michael4fm Montezuma Theme 5 Jan 3, 2013 03:30 PM
problems adding subtemplates jerryc Montezuma Theme 1 Oct 14, 2012 11:31 AM
Major problem! Help with templates issue paulae New Versions, & Updating 1 Apr 4, 2009 04:30 PM


All times are GMT -6. The time now is 07:18 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.