evocms-community / pagebuilder

Page Builder for Evolution CMS
29 stars 23 forks source link

Q: Using Chunk outside the Snippet #49

Closed fourroses666 closed 7 years ago

fourroses666 commented 7 years ago

Hi Mnoskov,

Can you help me out? When using a block (called slider) I'd like to show the js/css links on the bottom of the page outside the Snippetcall. (as example but could be used for different options)

Is it possible with the tplSet? https://github.com/mnoskov/pagebuilder/issues/31#issuecomment-316938562

I did a test but I don't know how it works. I need to add a custom Snippet? I thought it would work something like below;

...
<body>
<div class="wrapper">
[[PageBuilder]]
</div>

[[PageBuilder? &tplSet=`script`]]
</body>
</html>

Then the slider config has:

        'templates' => [
            'owner' => '
                <div class="slider-item">
                    <img src="[[phpthumb? &input=`[+image+]` &options=`w=680`]]" alt="" />
                </div>
            ',
            'script' => [
                'owner' => 'Loading a chunk here with the script visible on the bottom of the page',
            ],
        ],
mnoskov commented 7 years ago

Yes, this should work, but parameter is &templates, not &tplSet Description here - https://github.com/mnoskov/pagebuilder/blob/master/README.en.md#templates-groups

fourroses666 commented 7 years ago

Ah sorry, it works :))