Params inside of a custom tag?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Params inside of a custom tag?

Marc Pope-3
Is it possible to see all the passed params inside of a custom tag without
explicitly naming them. (Similar to action_params )??

For example:

    [    
      Define_Tag: 'myTag',
            -Required='template',
            -Description='this is my tag';
           
        local:'locals'=(named_params);    // this is root of my question
       
        iterate: #locals, (local:'tlocal');
            local: #tlocal = named_param: #tlocal;
        /iterate;

        if: #template == 'unsub';
            return: 'User ' #email ' has been unsubscribed.';
        else;
            return: 'Action unknown.';
        /if;
    /Define_Tag;

    ]

    [my_tag: -template='unsub', -email='[hidden email]']

    -> User [hidden email] has been unsubscribed.


Thanks!
Marc Pope
Web Development Director

Physicians Pharmaceuticals
Makers of RevivalĀ® Soy Protein Supplement
1031 E. Mountain Street, Bldg. 302
Kernersville, NC 27284

T: (336) 722-2337 x1738
C: (336) 688-3184
F: (336) 722-7712
E: [hidden email]
W: http://www.soy.com/




--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Params inside of a custom tag?

Douglas Burchard
On Oct 28, 2005, at 8:26 AM, Marc Pope wrote:

> Is it possible to see all the passed params inside of a custom tag  
> without
> explicitly naming them. (Similar to action_params )??

They're in an array named "Params".

     Params -> (Find: 'this');


--
Douglas Burchard, President
DouglasBurchard.com, Web Applications
15024 NE 66th Street
Redmond, WA  98052, USA

direct: (206) 227-8161
[hidden email]
http://www.douglasburchard.com/


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Params inside of a custom tag?

Mark Palmer
In reply to this post by Marc Pope-3
[Params] returns an array of all the parameters passed to a custom tag. The
array will contain single values or pairs depending on what parameters were
passed.

on 28/10/05 16:26, Marc Pope at [hidden email] wrote:

> Is it possible to see all the passed params inside of a custom tag without
> explicitly naming them. (Similar to action_params )??
>
> For example:
>
>     [    
>       Define_Tag: 'myTag',
>             -Required='template',
>             -Description='this is my tag';
>            
>         local:'locals'=(named_params);    // this is root of my question
>        
>         iterate: #locals, (local:'tlocal');
>             local: #tlocal = named_param: #tlocal;
>         /iterate;
>
>         if: #template == 'unsub';
>             return: 'User ' #email ' has been unsubscribed.';
>         else;
>             return: 'Action unknown.';
>         /if;
>     /Define_Tag;
>
>     ]
>
>     [my_tag: -template='unsub', -email='[hidden email]']
>
>     -> User [hidden email] has been unsubscribed.
>
>
> Thanks!
> Marc Pope
> Web Development Director
>
> Physicians Pharmaceuticals
> Makers of RevivalĀ® Soy Protein Supplement
> 1031 E. Mountain Street, Bldg. 302
> Kernersville, NC 27284
>
> T: (336) 722-2337 x1738
> C: (336) 688-3184
> F: (336) 722-7712
> E: [hidden email]
> W: http://www.soy.com/
>
>
>


Regards


Mark Palmer, Pageworks

T: 01902 620500            F: 01902 620440
E: [hidden email]    W: www.pageworks.co.uk



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Params inside of a custom tag?

Fletcher Sandbeck
In reply to this post by Marc Pope-3
On 10/28/05 at 11:26 AM by [hidden email] (Marc Pope):

>Is it possible to see all the passed params inside of a custom tag without
>explicitly naming them. (Similar to action_params )??

[Params] returns an array of all the parameters passed into a custom tag.  This is directly analogous to [Action_Params].  But, you'll need to iterate through the params or use the [Array->Find] tag to fetch particular parameters out of the array.

<http://reference.omnipilot.com/LDMLReference.0.LassoApp?tag=618>

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Lasso Product Specialist              [hidden email]
OmniPilot Software, Inc.                http://www.omnipilot.com

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage