Re: [development] Taxonomy

2010-11-28 Thread António P . P . Almeida
On 29 Nov 2010 00h32 WET, l...@stottdesign.com wrote: > [1 ] > Hello, > > I'm wondering how to do the following. > > I'm working with the Ubercart module where I need to display links > on each product page to all other products that share the same > taxonomy termID. Do I create a block view with

Re: [development] Taxonomy

2010-11-28 Thread Bruce Dou
http://drupal.org/project/views_attach is what you want. On Mon, Nov 29, 2010 at 8:32 AM, Lynn Stott (Stott Design) < l...@stottdesign.com> wrote: > Hello, > > I'm wondering how to do the following. > > I'm working with the Ubercart module where I need to display links on each > product page to a

[development] Taxonomy

2010-11-28 Thread Lynn Stott (Stott Design)
Hello, I'm wondering how to do the following. I'm working with the Ubercart module where I need to display links on each product page to all other products that share the same taxonomy termID. Do I create a block view with an argument of termID? If so, how do I pass the termID of the produ

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
Yup, sure was. Turns out I had tossed in a typo at some point. I also found, regarding the commented line to the external .js file, that you can't use drupal_add_js for that ... but drupal_set_html_head() does the trick. Thanks all! On 11/28/2010 04:22 PM, Larry Garfield wrote: Sounds like

Re: [development] php and js in a programmatic block

2010-11-28 Thread Larry Garfield
On Sunday, November 28, 2010 1:53:01 pm j...@ayendesigns.com wrote: > Makes sense (timing...the 4th dimension how it all is non-intuitive). > So, my Drupal function is now > > function _make_block() { > if (isset($_SESSION['test'])) { > drupal_set_message('setting'); > $sett

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
'Coming' or 'Going' would depend on your vantage point during the observation, the timing of your observation, and whether you were making a direct observation or wrapping your observation in another perspective on behalf of the another. I agree with the value of the diagram, especially if its

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
Makes sense (timing...the 4th dimension how it all is non-intuitive). So, my Drupal function is now function _make_block() { if (isset($_SESSION['test'])) { drupal_set_message('setting'); $settings = array( 'mymodule' => array( 'name' => $_SESSION[

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
Ha! Definitely. This can be shown by watching someone's eyes while trying to explain why js cannot control php values and, once the page is rendered, vice-versa. They typically glaze over after 30 seconds. On 11/28/2010 11:54 AM, Earl Miles wrote: I'm not sure there's any such thing as intuit

Re: [development] php and js in a programmatic block

2010-11-28 Thread Earl Miles
On 11/28/2010 8:14 AM, j...@ayendesigns.com wrote: > Nevets, > > Understood and you're correct. I was just musing about the settings > structure instead of calling regex, but as the former has been put in > place to avoid needing to do the latter, it's easier even if not more > intuitive! I'm not

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
Thanks Victor. That link had another link in the comments which shows a good example of how to use settings! On 11/28/2010 11:18 AM, Victor Kane wrote: Check out this handbook page for passing parameters to javascript: http://drupal.org/node/127067 Victor Kane http://awebfactory.com.ar http:/

Re: [development] php and js in a programmatic block

2010-11-28 Thread Victor Kane
Check out this handbook page for passing parameters to javascript: http://drupal.org/node/127067 Victor Kane http://awebfactory.com.ar http://projectflowandtracker.com On Sun, Nov 28, 2010 at 1:14 PM, wrote: > Nevets, > > Understood and you're correct. I was just

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
Nevets, Understood and you're correct. I was just musing about the settings structure instead of calling regex, but as the former has been put in place to avoid needing to do the latter, it's easier even if not more intuitive! Thanks again.

Re: [development] php and js in a programmatic block

2010-11-28 Thread Steve Ringwood
Jeff Both this approach (settings) and inline can work. I suggested this because you have a script that needs dynamic values. Making the script a function you can call with the two value and the inline approach would be another approach. Nevets On 11/28/2010 10:04 AM, j...@ayendes

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
Ah, gotcha. Not sure this is more intuitive than the other way, but if it's common practice then so be it :) Thanks! On 11/28/2010 11:02 AM, Steve Ringwood wrote: Jeff You still want to drupal_add_js(), but instead of one call you want two. The first is to add your mymodule.js

Re: [development] php and js in a programmatic block

2010-11-28 Thread jeff
Hi Fred. I -have- read that, but I guess when I read the description of inline referring to the current page... I have to force myself to think of a function creating block contents for a function that creates a block for a module AS being the current page as opposed to being busy -creating- th

Re: [development] php and js in a programmatic block

2010-11-28 Thread Steve Ringwood
Jeff You still want to drupal_add_js(), but instead of one call you want two. The first is to add your mymodule.js The second is to do something like $settings = array( 'MyModule' => array( 'value1' => 'some value', 'value2' => 'some other value' ) );

Re: [development] php and js in a programmatic block

2010-11-28 Thread Fred Jones
> So far so good. However, the js needs to be dynamic...there are two function > values that need to be embedded in it. I'm thinking that with this being the > case, drupal_add_js might not be the way to go (back to escaping quotes), > but wanted to poll first for best practice, since I'll be contr

[development] php and js in a programmatic block

2010-11-28 Thread jeff
Nothing confuses me faster than mixing php and js (and especially escaping the quotes). In this case, my confusion is the concept and not the gobblygook. I have a module invoking hook_block, and a function that creates and returns the block content. In this function I invoke drupal_add_js to