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

Old Jul 24, 2013, 09:22 AM
41 posts · Jun 2010
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:

'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.
Old Jul 24, 2013, 10:07 AM
lmilesw's Avatar
10,176 posts · Jul 2009
Central New York State USA
Why not just use CSS to adjust the author to uppercase?
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
Old Jul 25, 2013, 01:56 PM
41 posts · Jun 2010
Yes, I could use text-transform but I've had cross-browser problems. But that's not the point. The example is meant to show how to use a physical subtemplate called from with a virtual main template. Sorry if my example was distracting.
Old Aug 15, 2013, 01:10 PM
41 posts · Jun 2010
Will access to bfa_get_template_part() be restored in an upcoming release? It is meant to be available, is documented, was patched in earlier versions. I need to inform a client whether they need to patch get_whitelist.php but I'd rather just have them get a fixed version.
Old Aug 15, 2013, 04:12 PM
juggledad's Avatar
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Update: I just putt the change in, packaged it and sent it to the developer

Yes it will get into the next release. I'm not sure how it got dropped, but there were multiple updates and it looks like this piece got dropped. I'll submit this to teh developer and hope he can submit it to WordPress for review (although the review lag could be a couple weeks...sigh)

Last edited by juggledad; Aug 15, 2013 at 04:27 PM.


bfa_get_template_part, get_whitelist, subtemplate, template, virtual

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:40 AM
[SOLVED] Need help differentiating virtual and physical templates Michael4fm Montezuma Theme 5 Jan 3, 2013 04:30 PM
problems adding subtemplates jerryc Montezuma Theme 1 Oct 14, 2012 12:31 PM
Major problem! Help with templates issue paulae New Versions, & Updating 1 Apr 4, 2009 05:30 PM

All times are GMT -6. The time now is 03:36 AM.

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