Type attribute in oxid smarty extensions

I am new to smarty and just getting familiar with it in the context of OXID. Was looking at the ‘oxid_include_dynamic’ function which is described in the manual for the single ‘file’ attribute but noticed its use with several additional attributes. A quick look at the code suggests that these extra attributes are used as variables in the template being included, with the name of each variable prefixed by the name of the ‘type’ attribute. For example, in the code

[{oxid_include_dynamic file=“dyn/mini_basket.tpl” type=“basket” extended=true testid=“RightBasket”}]

the variable $_basket_extended and $_basket_testid will be available for use in the mini_basket.tpl template.

However, I’ve noticed use of the ‘type’ attribute alone, such as with

[{oxid_include_dynamic file=“dyn/top_basket.tpl” type=“basket”}]

What is the purpose of the ‘type’ attribute in this case?

…Hello? :confused:

Is this question not relevant on this thread? Should I post elsewhere?

Previous thread mentions that English posts may have to be ‘pushed’ to get a response… is this considered pushing or should I do something else?

Any help would be appreciated.

Hi spurvis,

hey, you don’t push in forums :smiley:
I just had a look at it and found this Smarty extension:
http://svn.oxid-esales.com/tags/CE-4.4.4-30554/eshop/core/smarty/plugins/function.oxid_include_dynamic.php

On line 56, the type attribute is defined:

        if ( array_key_exists('type', $params) ) {
            $sPrefix.= $params['type']."_";
        }

I cant see any usage without a parameter. So I reckon it is a rudiment or something “dirty”.

Regards

Hi again,

caught just a short hint, didn’t look by myself yet:
Have a look at the method oxcache::_processDynContent

Regards

Thks, I will have a look.