[REQUEST]patTemplates sub forum
-
- Joomla! Guru
- Posts: 527
- Joined: Fri Aug 19, 2005 9:27 am
[REQUEST]patTemplates sub forum
We're beginning to get a few discussions on patTemplates. I suspect as more developers begin to use patTemplates there will be many more. I've been using patTemplates for the last couple of components I'm working on and it would be nice to have a central place to discuss patTemplate issues.
Al Warren
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
- absalom
- Joomla! Ace
- Posts: 1199
- Joined: Thu Aug 18, 2005 12:37 am
- Location: Melbourne, Australia
- Contact:
Re: [REQUEST]patTemplates sub forum
Hey, al, can you bump a pT tutorial or two my way, if at all possible (that is, if you have any) ?
I'm going to be releasing an all-in-one component/module/bot package soon and I haven't been looking at how pT differs from everything else.
I'm going to be releasing an all-in-one component/module/bot package soon and I haven't been looking at how pT differs from everything else.
Design with integrity : Web accessible solutions
http://www.absalom.biz
http://twitter.com/absalomedia
http://www.absalom.biz
http://twitter.com/absalomedia
-
- Joomla! Guru
- Posts: 527
- Joined: Fri Aug 19, 2005 9:27 am
Re: [REQUEST]patTemplates sub forum
I'll have to sit down and throw something together. I've been thinking about it. I've come across a few roadblocks and their associated fixes/workarounds. There are still some questions that need answering. Still in the learning process myself. But what I'm finding is it takes a different approach/mindset to use patTemplates. Well, I guess on second thought, it all depends on how you implement it. For example, do you put all your logic in a template framework and use sub templates, or do you use php for your logic and use pat to output snippets. I'm talking output logic here. For example, you want to control what output is rendered and when, etc. You can actually do some pretty complex logic in the template itself. But it can get pretty messy. A solution I'm working with is to use a logic template with a separate file containing sub-templates. One advantage of using templates is language translation. You could actually create multiple templates based on language then just load the one you need based on the Joomla language variable. Sorry I've rambled a bit. But yes, I will see what I can come up with. Just remember I'm still going through a learning curve myself.
If I can put something together, I'll post it in the FAQs section.
I recommend downloading a copy of patTemplates from http://www.php-tools.net. There is a decent set of examples you can study in the examples/ folder. But note, the version for Joomla has been modified some. I suggest you use the Joomla version for your experiments.
If I can put something together, I'll post it in the FAQs section.
I recommend downloading a copy of patTemplates from http://www.php-tools.net. There is a decent set of examples you can study in the examples/ folder. But note, the version for Joomla has been modified some. I suggest you use the Joomla version for your experiments.
Al Warren
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
- Hackwar
- Joomla! Virtuoso
- Posts: 3788
- Joined: Fri Sep 16, 2005 8:41 pm
- Location: NRW - Germany
- Contact:
Re: [REQUEST]patTemplates sub forum
Hi alwarren,
as you are aware, I'm writing on some component stuff, too, and wanted to do the output by pT. I read the example from the help.joomla.org but I couldn't really make something from that How-TO. It describes how to load a pT-template, but not how to use it nicely.
What I wanted to say: I would be grateful, too, if you could write something more advanced. I think it would help a lot of people.
hackwar
as you are aware, I'm writing on some component stuff, too, and wanted to do the output by pT. I read the example from the help.joomla.org but I couldn't really make something from that How-TO. It describes how to load a pT-template, but not how to use it nicely.
What I wanted to say: I would be grateful, too, if you could write something more advanced. I think it would help a lot of people.
hackwar
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.
Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.
Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.
-
- Joomla! Enthusiast
- Posts: 203
- Joined: Sat Aug 20, 2005 1:40 am
- Location: south of France
Re: [REQUEST]patTemplates sub forum
hello
i do agree with creating a subforum in the Jommla! 's forum.
like the others, im trying to change my logic to use patTemplate...
step by step, i try and test....
(thank you Alwarren for your tip to use tab panels and dump() (in this forum), it works fine )
i anonymously asked questions on the phptools forum (thanks to Alwarren again for answering ), but the Joomla! 's pat engine was modified and im embarassed to ask questions on the phptools forum if i speak about Joomla!.
i do agree with creating a subforum in the Jommla! 's forum.
like the others, im trying to change my logic to use patTemplate...
step by step, i try and test....
(thank you Alwarren for your tip to use tab panels and dump() (in this forum), it works fine )
i anonymously asked questions on the phptools forum (thanks to Alwarren again for answering ), but the Joomla! 's pat engine was modified and im embarassed to ask questions on the phptools forum if i speak about Joomla!.
Last edited by wene on Thu Oct 27, 2005 1:04 pm, edited 1 time in total.
- misk0
- Joomla! Explorer
- Posts: 455
- Joined: Thu Oct 06, 2005 6:33 pm
- Location: Lugano - CH
Re: [REQUEST]patTemplates sub forum
I just want to support the idea of creating patTemplate subforum, and I agree with all things told.
- Vimes
- Joomla! Ace
- Posts: 1675
- Joined: Fri Aug 19, 2005 12:14 am
- Location: United Kingdom
- Contact:
Re: [REQUEST]patTemplates sub forum
Seconded, thirded whatever.
http://www.jomres.net THE online hotel booking and reservation system for Joomla and Wordpress.
- Predator
- Joomla! Ace
- Posts: 1823
- Joined: Wed Aug 17, 2005 10:12 pm
- Location: Germany-Bad Abbach
- Contact:
Re: [REQUEST]patTemplates sub forum
Due to the fact that patTemplate will be the most important part for output and a really new part for 3PD's the topic patTemplate will rise, to move it now to a better infastructure ( subforum ) would be a good step. Or what do you thing Brad?
I have also a lot stuff ready which use patTemplate, so to post some here as example would be helpful, but not all in one Thread
I have also a lot stuff ready which use patTemplate, so to post some here as example would be helpful, but not all in one Thread
Last edited by Predator on Thu Oct 27, 2005 11:14 pm, edited 1 time in total.
The "Humor, Fun and Games" forum has more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team
.....
Malicious tongues say we have this WG right from the start, they call it core team
- Predator
- Joomla! Ace
- Posts: 1823
- Joined: Wed Aug 17, 2005 10:12 pm
- Location: Germany-Bad Abbach
- Contact:
Re: [REQUEST]patTemplates sub forum
Now we have a subforum patTemplate as requested al
The "Humor, Fun and Games" forum has more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team
.....
Malicious tongues say we have this WG right from the start, they call it core team
-
- Joomla! Guru
- Posts: 527
- Joined: Fri Aug 19, 2005 9:27 am
Re: [REQUEST]patTemplates sub forum
Thanks Marko!
Now all I have to do is get off my lazy arse and write something. Maybe in a couple days. Got a big day at the R/C field tomorrow and a kegger afterwards.
Thanks again.
Now all I have to do is get off my lazy arse and write something. Maybe in a couple days. Got a big day at the R/C field tomorrow and a kegger afterwards.
Thanks again.
Al Warren
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
- Predator
- Joomla! Ace
- Posts: 1823
- Joined: Wed Aug 17, 2005 10:12 pm
- Location: Germany-Bad Abbach
- Contact:
Re: [REQUEST]patTemplates sub forum
This would be great, we need soon or later a Guideline for 3PD's and if you contribute now something for this i appreciate this and hopefully you allow that some of your Stuff flow into even this new upcoming Guideline.alwarren wrote: Thanks Marko!
Now all I have to do is get off my lazy arse and write something. Maybe in a couple days. Got a big day at the R/C field tomorrow and a kegger afterwards.
Thanks again.
The "Humor, Fun and Games" forum has more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team
.....
Malicious tongues say we have this WG right from the start, they call it core team
-
- Joomla! Guru
- Posts: 527
- Joined: Fri Aug 19, 2005 9:27 am
Re: [REQUEST]patTemplates sub forum
I'd like to see some input from Andrew since he seems to be the most knowledgeable with pat. I'm still in the learning curve myself. And given that pat is not that well documented, the curve is a little steeper than normal. We also need some documentation on the differences between pat version of patTemplates and J! version. Also, whether or not other changes to the pat core are anticipated.
Al Warren
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW
- Predator
- Joomla! Ace
- Posts: 1823
- Joined: Wed Aug 17, 2005 10:12 pm
- Location: Germany-Bad Abbach
- Contact:
Re: [REQUEST]patTemplates sub forum
Agree, i will also look into the changes, i know there are a lot changes.alwarren wrote: I'd like to see some input from Andrew since he seems to be the most knowledgeable with pat. I'm still in the learning curve myself. And given that pat is not that well documented, the curve is a little steeper than normal. We also need some documentation on the differences between pat version of patTemplates and J! version. Also, whether or not other changes to the pat core are anticipated.
Looking into Joomla! 1.1and Joomla 1.0 you have some defined vars patTemplate:
Code: Select all
$tmpl->addGlobalVar( 'option', $GLOBALS['option'] );
$tmpl->addGlobalVar( 'self', $_SERVER['PHP_SELF'] );
$tmpl->addGlobalVar( 'itemid', $GLOBALS['Itemid'] );
$tmpl->addGlobalVar( 'siteurl', $GLOBALS['mosConfig_live_site'] );
$tmpl->addGlobalVar( 'adminurl', $GLOBALS['mosConfig_live_site'] . '/administrator' );
$tmpl->addGlobalVar( 'admintemplateurl', $GLOBALS['mosConfig_live_site'] . '/administrator/templates/' . $mainframe->getTemplate() );
$tmpl->addGlobalVar( 'sitename', $GLOBALS['mosConfig_sitename'] );
$tmpl->addGlobalVar('treecss', 'dtree.css');
$tmpl->addGlobalVar('treeimgfolder', 'img');
$tmpl->addGlobalVar( 'page_encoding', "utf-8" );
$tmpl->addGlobalVar( 'version_copyright', $GLOBALS['_VERSION']->COPYRIGHT );
$tmpl->addGlobalVar( 'version_url', $GLOBALS['_VERSION']->URL );
$tmpl->addVar( 'form', 'formAction', $_SERVER['PHP_SELF'] );
$tmpl->addVar( 'form', 'formName', 'adminForm' );
// tabs
$turl = $GLOBALS['mosConfig_live_site'] .'/includes/js/tabs/';
$tmpl->addVar( 'includeTabs', 'taburl', $turl );
Some new tags:
Help for translation
adding tooltips
Cancel Button
For the Tabpane you can use :
Code: Select all
<mos:link src="includeTabs" />
<mos:Call template="startTabPane" paneid="a" panecookies="0" />
<mos:Call template="startTab" paneid="a" tabtitle="Meta Data" />
<mos:link src="xml-meta-form-table" />
<mos:link src="endTab" />
<mos:Call template="startTab" paneid="a" tabtitle="Files" />
<div align="left">
<strong>Site Files:</strong>
<table class="adminlist">
<mos:tmpl name="site-files-list" type="simplecondition" requiredvars="file" addSystemVars="integer">
<tr class="row{PAT_IS_EVEN}">
<td width="20">
<input type="checkbox" name="vars[siteFiles][]" value="{FILE}" checked="true" />
</td>
<td width="20">
<mos:tmpl type="condition" conditionvar="mambot" varscope="site-files-list">
<mos:sub condition="__default">
<input type="radio" name="vars[module]" value="{FILE}" />
</mos:sub>
<mos:sub condition="1">
<input type="radio" name="vars[module]" value="{FILE}" checked="yes" />
</mos:sub>
</mos:tmpl>
</td>
<td>
{FILE}
</td>
</tr>
</mos:tmpl>
<tr>
</table>
<br />
<input type="button" value="Refresh Files" onclick="submitbutton('refresh_files')" class="button" />
</div>
<mos:link src="endTab" />
<mos:Call template="startTab" paneid="a" tabtitle="Parameters" />
<mos:link src="xml-params-table" />
<mos:link src="endTab" />
<mos:link src="endTabPane" />
So to have a complete summary and how to use this is also a goal of the S&G Team.
The "Humor, Fun and Games" forum has more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team
.....
Malicious tongues say we have this WG right from the start, they call it core team