We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Bizare template/plugin (caching?) issue...

Development and Programming

Matt Richards's avatar
Matt Richards
11 posts
16 years ago
Matt Richards's avatar Matt Richards

Hi,

I’m currently experiencing a very strange issue where byplugin parameters are not being passed (or visible at all) to the plugin.

I’ve written a simple plugin with the following structure:

{exp:vc_plugin:archive_widget weblog="page" site="1" category="2"}
...
{/exp:vc_plugin:archive_widget}

with the following code in pi.vc_plugin.php (abstracted for clarity):

function archive_widget() {
    global $DB, $TMPL;
    
    

   $weblog   = $TMPL->fetch_param('weblog');
   $cat_id   = $TMPL->fetch_param('category');
   $site_id  = $TMPL->fetch_param('site'); 
   $tagdata = $TMPL->tagdata;
    
    print "<pre>" . print_r($TMPL,1) . "</pre>

<p>”;</p>

<p>…
</pre>

print_r output (abstracted for clarity):

[4] => Array
                (
                    [tag] => {exp:vc_accountis:archive_widget weblog="blog"}
                    [class] => vc_accountis
                    [method] => archive_widget
                    [tagparts] => Array
                        (
                            [0] => vc_accountis
                            [1] => archive_widget
                        )

                    [params] => Array
                        (
                            [weblog] => blog
                        )
...

As you can see, it’s not seeing the site or category parameters…

I have saved the template as a file, reopened in EE and saved via the CP, deleted all system/cache etc etc.

Any ideas! This one has got me stumped! (and yes, I am definitely editing the correct file)

Thanks in advance

M

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.