PatTemplate Aufruf Joomla! 1.5

Fragen zum Entwickeln eigener Addons?

Moderator: General Support Moderators

Forum rules
Forumregeln
Locked
User avatar
musicones
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 176
Joined: Fri Aug 19, 2005 5:52 am

PatTemplate Aufruf Joomla! 1.5

Post by musicones » Wed Aug 09, 2006 10:29 am

Hallo,

hat mal kurz jemand den neuen Aufruf für das patTemplate in Joomla! 1.5?

Bisher hatte ich das so:

Code: Select all

function &createTemplate() {
		global $option, $mosConfig_absolute_path;
		require_once( $mosConfig_absolute_path . '/includes/patTemplate/patTemplate.php' );

        }
		$tmpl =& patFactory::createTemplate( $option, true, false );
		$tmpl->setRoot( dirname( __FILE__ ) . '/tmpl' );

		return $tmpl;
	} 

	function showAbout() {
       // import the body of the page
        $tmpl =& showAbout::createTemplate();
        $tmpl->setAttribute( 'body', 'src', 'about.html' );

        $tmpl->displayParsedTemplate( 'form' );
	}
Wo liegt das teil jetzt und wie ist der richtige Aufruf?
Ein Codeschnipsel würde helfen, danke.

EDIT: Vielen Dank.

Gruß
Antonio Cambule
Last edited by musicones on Mon Aug 14, 2006 11:27 am, edited 1 time in total.

User avatar
rdeutz
Joomla! Explorer
Joomla! Explorer
Posts: 355
Joined: Thu Aug 18, 2005 6:50 am
Location: Germany - Aachen
Contact:

Re: PatTemplate Aufruf Joomla! 1.5

Post by rdeutz » Fri Aug 11, 2006 9:37 am

musicones wrote: Wo liegt das teil jetzt und wie ist der richtige Aufruf?
Ein Codeschnipsel würde helfen, danke.
Bitteschön:

Code: Select all

$tmpl =& new JTemplate;
$tmpl->setNamespace( 'watauchimmer' )
$tmpl->setRoot( dirname($fullpathToTemplateInclTemplateFilename) );
$tmpl->parse( basename($fullpathToTemplateInclTemplateFilename) );

$tmpl->addvar('TEMPLATENAME','VARNAME',$VALUE)

....

$tmpl->display('TEMPLATENAME');
Best Regards, Robert
My Blog: http://www.robert-deutz.de - follow me on twitter @rdeutz
Professional Services for Joomla! http://rdbs.de - follow on twitter @rdbsnews


Locked

Return to “Entwicklerforum”