[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Phpgroupware-developers] tips for porting your application to xslt
From: |
Sigurd Nes |
Subject: |
RE: [Phpgroupware-developers] tips for porting your application to xslt |
Date: |
Fri, 10 Jan 2003 20:13:09 +0100 |
The statement $GLOBALS['phpgw_info']['flags']['headonly'] = True;
don't seem to work - I get an errormessage complaining about "Sablotron
error on line 37: called nonexistent rule 'help' "
the line
<xsl:call-template name="help"/>
should be altered to
<xsl:call-template name="app_data"/>
in 'phpgw_header.xsl'
Also I would very much like the switch 'headonly' to be placed inside a
function - and not in the 'index.php'
Regards
Sigurd
>
> hey,
> some more introduction how to port your app to use the xslt framework:
>
> you add a xsl tpl file with '$GLOBALS['phpgw']->xslttpl->add' and for
the
> vars you use 'set_var'. this is all, since the final parsing is done
by
> the framework now. also you shouldnt create an extra tpl object within
the
> app anymore, please always use $GLOBALS['phpgw']->xslttpl, which is
> created by the framework as well. the header- and navbar call are
gone.
>
> there are some requirements for the tpl names now. the main app xslt
> file has to be called 'app_data.xsl'.
>
> if an app uses extra html for the home screen data (hook_home), the
tpl is
> called 'extradata.xsl' (example: stocks). some more apps are
> already updated to use the xslt based hook_home, i.e. news_admin.
>
> if you want to use pages without the navbar, like a printview, this
can be
> done by using $GLOBALS['phpgw_info']['flags']['headonly'] = True;.
>
> the about page now is created by using the data in setup.inc.php. no
> hook_about file is needed anymore.
>
> the help system now uses a hook_help. i moved out of the manual
> app all of the app help data. only the framework help parts, like
allover
> descriptions of the welcome page etc still are located in manual. the
> manual app will not appear in the navbar anymore. for the help
> system i added a '?' at the top right navbar of each layout. about now
> uses a '!'. (for the idsociety and the justweb layout we still need to
> create the '!' icons. right now there are two '?')
> the help system will now be available automatically for each user,
like
> preferences. as an example for the new help system, please have a look
at
> the addressbook app. there i got some conent done already so you can
get
> an impression on how it should work.
>
> reiner jung (reinerj) would like to work on the help contents. please
> help him out if he is asking you for facts about how your app works.
>
> the notes app is nearly complettly ported to use xslt. this app can
> be used as a simple example how to get it done.
>
> the framework and the main services, like hook_home, hook_about, the
new
> help system and the graphically api-functions i.e. in class.categories
and
> class.nextmatchs work well so far.
>
> at this point, the app which already use the xslt tpl system, have to
be
> listed in the main phpgw index.php file. this is a temporarily
situation
> only. otherwise we would have to add an argument to the menuaction,
which
> i want to avoid. when we have more apps using xslt, we could add such
an
> option to the menuaction for nonxslt apps only.
>
> i think while porting the apps we sure will notice parts of the
> environment which will have to be improved. comments and suggestions
are
> appreciated.
>
> if you got some more questions, dont wait to ask.
>
> happy coding
> grtx. ceb
>
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>