[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fmsystem-developers] (my) First post!
From: |
Sigurd Nes |
Subject: |
Re: [Fmsystem-developers] (my) First post! |
Date: |
Tue, 21 Jun 2011 23:59:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10 |
On 06/21/2011 04:24 PM, Thomas Lundquist wrote:
On Mon, Jun 20, 2011 at 06:04:58PM +0200, Sigurd Nes wrote:
Hi
It seems like you refer to the 'bookingfrontend'
And booking, yes.
[snip]
How do you think?
Thanks you very much for a comprehensive and informative way of telling me
I was wrong. I am happy I asked here before jumping to the code
ending up with a mess.
The little hint to the file, line 154 was good, now I know what to look
for and I'm working on doing it as properly as possible.
BTW, looking at tmpl_search_path which seems to control this and it actually
looks like base is not a fallback but the first used and the tmpl_search_path
goes in reverse. Which means base is not the fallback but the first it
attempts to find files in.
The first attempt: the rootdir is given as /<app>/templates/<templateset>
The second attempt: the rootdir is given as /<app>/templates/base
Actually, it does not look like it's meant to have specific templates
under<application>templates:
All templates beneath phpgwapi/templates/ are availlable for useres to choose
from in 'preferences' (not all of them works)
However - you can also override the templates by config as follows:
$GLOBALS['phpgw']->xslttpl->add_file(array('template1', 'template2'),
PHPGW_SERVER_ROOT . '/<app>/templates/<templateset>');
activitycalendar/inc/class.uicommon.inc.php
66: $this->tmpl_search_path = array();
67: array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT .
'/phpgwapi/templates/base');
68: array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT .
'/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']);
69: array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT .
'/' . $GLOBALS['phpgw_info']['flags']['currentapp'] . '/templates/base');
So, is it the bookingfrontend that's wrong here or should I just add the
extra element to the tmpl_search_path where it's appopriate? I have
tested and it works but if it's a no-no I'll find some other method.
The proper way (I think) is shown above.
Please don't use 'activitycalendar' or 'rental' as template for coding - as
these ones dont utilise the templating system as intended.
examples:
notes, (very simple, xslt only)
demo, (a bit more complicated, xslt only)
property, (comprehensive: xslt + yui)
frontend, (xslt + yui)
booking/bookingfrontend, (advanced: xslt + yui)
My rationale for preferring xslt for rendering - is that I imagine one can adapt
the output for different targets based on the same dataset just by altering the
template.
(Btw - you are approved as developer at the project)
Thanks alot, I just commited a bugfix to trunk and I hope that's ok.
For real development it seems I should use my own dev branch and play there.
Or should i *always* work on branches and let you pick patches for trunk?
I think you should operate one your own branch at first - after a while
(training period) you can move to trunk - which is base for periodic merge to
stable branch.
(BTW, any irc channel or something for this project? seems like you are working
quite a bit on this and if I am aswell I'd be very delighted if I could pester
you in more or less real time.)
I suppose I could use google-talk
Regards
Sigurd