[themes] Modules extending themes functionality

Marek Sotak marek at sotak.co.uk
Fri Feb 22 09:07:00 UTC 2008


The jquery actually has a click function for a.href with specified class.
This can be for sure in theme but then it calls something like
mycallback/admin/build, etc... which is an ajax call, so i need to get only
content, not whole page.

So the module has a menu item, mycallback% where it takes the wildcard, gets
the menu item for that (so if mycallback/admin/build will be called it will
take admin/build) and calls the function from menu router item
(page_callback) with arguments. Then I am just printing output of this
function and exiting (standart ajax method).

Can't do this in theme though.

marek


On Fri, Feb 22, 2008 at 5:05 AM, Larry Garfield <larry at garfieldtech.com>
wrote:

> What sort of jquery?  You can do jquery from the theme, too.  It only
> needs a
> module if it has to hook back to some Ajax/AHAH functionality.
>
> On Thursday 21 February 2008, Marek Sotak wrote:
> > Yea, I should do that. thanks for suggestion. :)
> >
> > The modules functionality right now is just jquery interaction right
> now,
> > and the theme works without it.
> >
> > Marek
> >
> > On Fri, Feb 22, 2008 at 1:02 AM, Bevan Rudge <bevan at civicactions.com>
> wrote:
> > > I suggest you create an issue node and/or write a patch for drupal 7
> > > that allows themes to have module dependencies, and possibly allows
> > > modules to be installed from themes directories
> > >
> > > For drupal < 7, wrap any module-dependent code in if
> > > (module_exists('MODULENAME')).
> > >
> > > Bevan/
> > > _______________________________________________
> > > themes mailing list
> > > themes at drupal.org
> > > http://lists.drupal.org/mailman/listinfo/themes
>
>
> --
> Larry Garfield                  AIM: LOLG42
> larry at garfieldtech.com          ICQ: 6817012
>
> "If nature has made any one thing less susceptible than all others of
> exclusive property, it is the action of the thinking power called an idea,
> which an individual may exclusively possess as long as he keeps it to
> himself; but the moment it is divulged, it forces itself into the
> possession
> of every one, and the receiver cannot dispossess himself of it."  --
> Thomas
> Jefferson
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>



-- 
__________________________________ ____ ___ __ _ .. .. .
Give a man a fish, and you'll feed him for a day. Teach a man to fish, and
he'll buy a funny hat. Talk to a hungry man about fish, and you're a
consultant.
- Scott Adams

http://sotak.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20080222/85200584/attachment.htm 


More information about the themes mailing list