<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">please<BR><BR>--- On <B>Fri, 1/2/09, Shai Gluskin <I>&lt;shai@content2zero.com&gt;</I></B> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Shai Gluskin &lt;shai@content2zero.com&gt;<BR>Subject: Re: [support] inter module communication, hooks and dependencies<BR>To: support@drupal.org<BR>Date: Friday, January 2, 2009, 9:56 AM<BR><BR>
<DIV id=yiv1669273232>Hi Ivan,<BR><BR>I just looked over your post really quickly. But that quick glance makes me think you are need of one or both of the following modules in addition to nodewords:<BR><BR>
<DIV style="MARGIN-LEFT: 40px"><A href="http://drupal.org/project/nodewords_bypath" target=_blank rel=nofollow>http://drupal.org/project/nodewords_bypath</A><BR><A href="http://drupal.org/project/nodewords_nodetype" target=_blank rel=nofollow>http://drupal.org/project/nodewords_nodetype</A><BR></DIV><BR>best,<BR><BR>Shai<BR><A href="http://content2zero.com/" target=_blank rel=nofollow>content2zero</A><BR><BR>
<DIV class=gmail_quote>On Fri, Jan 2, 2009 at 9:17 AM, Ivan Sergio Borgonovo <SPAN dir=ltr>&lt;<A href="mailto:mail@webthatworks.it" target=_blank rel=nofollow>mail@webthatworks.it</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi,<BR><BR>The actual problem is providing an API to let modules add META in a<BR>more structured way so that eg. the same META is not sent 2 times or<BR>module can decide to concatenate further meta or define a<BR>"owerwriteability" level.<BR><BR>I gave a look to nodewords aka Meta tags but I have stuff that<BR>aren't nodes (they aren't views or taxonomies either) that don't fit<BR>with the node paradigm too well.<BR><BR>nodewords provide a hook to 'prepare' META but it is on a module<BR>base.<BR>Nodewords needs to be aware of all the content types (or just pages,<BR>menu_hook etc...) it can support (*unless I'm missing something...*)<BR>but actually what know better which are the most suitable meta for a<BR>"content" should be the content producer (be it a "node" or just a<BR>MENU_CALLBACK).<BR>Other modules like nodewords_bypath
 and _nodetype do some extrawork<BR>to know what actually called the hook.<BR>But I'd find myself more comfortable with a different approach:<BR>- there is a common API that let me manage META<BR>- modules that want to add META use it<BR>- when everything is ready drupal_set_html_head get called<BR><BR>The problem is:<BR>- the API functions should be ready when other modules call them<BR>- drupal_set_html_head($meta) should be called last<BR><BR>If the weight of my meta module is high, other modules won't find<BR>the functions.<BR>If the weight of my module is low and I put<BR>drupal_set_html_head($meta) in the menu hook, drupal_set_html_head<BR>will be called before $meta had the chance to be filled by other<BR>modules.<BR><BR>I'd say this is a general common problem but I didn't find any<BR>"drupalish" way to solve it.<BR><BR>The easiest (and somehow elegant) way I thought to deal with this<BR>problem was to build up 2 modules with different
 weight):<BR>- meta_prepare (that will offer the functions)<BR>- meta_deliver (that will simply call drupal_set_html_head)<BR><BR>Is there a more drupalish way to deal with dependency and "order of<BR>execution" in drupal?<BR><BR>thanks<BR><BR>--<BR>Ivan Sergio Borgonovo<BR><A href="http://www.webthatworks.it/" target=_blank rel=nofollow>http://www.webthatworks.it</A><BR><FONT color=#888888><BR>--<BR>[ Drupal support list | <A href="http://lists.drupal.org/" target=_blank rel=nofollow>http://lists.drupal.org/</A> ]<BR></FONT></BLOCKQUOTE></DIV><BR></DIV><PRE>-- 
[ Drupal support list | http://lists.drupal.org/ ]</PRE></BLOCKQUOTE></td></tr></table>