GetSimple Support Forum

Full Version: gallery in component
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I put (% gallery name=slideshow2 %) in component , and in sidebar template put <?php get_component('footer1'); ?>

And in page this gallery shows just as text (% gallery name=slideshow2 %).

How to put (% gallery name=slideshow2 %) in component correctly, please help.
(2013-05-12, 17:16:25)tigre Wrote: [ -> ]I put (% gallery name=slideshow2 %) in component , and in sidebar template put <?php get_component('footer1'); ?>

And in page this gallery shows just as text (% gallery name=slideshow2 %).

How to put (% gallery name=slideshow2 %) in component correctly, please help.

In a component galleries won't work correctly. But you can put the calls get_i18n_gallery_header(...) and get_i18n_gallery(...) into your template as described here.
In a component galleries won't work correctly. But you can put the calls get_i18n_gallery_header(...) and get_i18n_gallery(...) into your template as described here.
[/quote]

Thank you. It works. I put get_i18n_gallery_header(...) in <head> section and get_i18n_gallery(...) in sidebar.

Thank you.
Hi,

I've tried putting a gallery in a component using the information noted here. I was able to have the gallery show, but could not get the cycle to function.

<?php get_i18n_gallery('carryout-ss',
array('type'=>'cycle', 'autostart'=>true)); ?>

You can see the page here:
http://medbake.com/kitchentest

You can see the plugin working on a regular page here:
http://medbake.com/kitchencycle

I tried removing the autostart and that did not work. I have Do not include Jquery checked. I also tried putting this code into the template and that did not show at all.

I'm hoping there is a way to make the cycle (fade) work as the series of images function as a nice bit of animation when the fade works. As a static image it's nice, but not as interesting. And as a gallery you need to click through the images it would be silly. :-)

Any suggestions for how to make this work will be much appreciated.

Thank you,
Sherri
Forgot to show you my template code. The theme I am using (Metrical) relies on components to create a block layout:

PHP Code:
<div class="row">
    <
section class="eight columns">
           <?
php  if (component_exists('kitchentest-col1'))
            {
get_component('kitchentest-col1');}
            else {echo(
'
                <h2>First Block</h2>
                <p>Make a component and name it \'1of2\' and write in it whatever html you want to appear here</p>
            '
);}    ?>
    </section>
    <section class="eight columns">
        <?php  if (component_exists('kitchentest-col2'))
            {
get_component('kitchentest-col2');}
            else {echo(
'
            <h2>Second Block</h2><p>Make a component and name it \'2of2\' and write in it whatever html you want to appear here</p>
            '
);}    ?>
    </section>
</div> 

Adding
PHP Code:
<?php get_i18n_gallery('carryout-ss',
array(
'type'=>'cycle''autostart'=>true)); ?>
Into the template above the call for the component col1 did not work as the gallery did not show on the page.
I added \[php\] code tags
Hi Shawn_a,

I'm not sure what you mean. Would you mind explaining further? I am not a programmer.

Thank you for your reply.

Sherri
I edited your post your code was normal text. Use code tags when posting code so it is highlighted.
Ok. Thanks! I reviewed the post to see what you were referring to.
I wonder if you need the { and } in the get component code
(2015-01-21, 01:51:27)datiswous Wrote: [ -> ]I wonder if you need the { and } in the get component code

I will try removing it to see what happens and post my results!

Thank you taking the time to review. I appreciate it.

Sherri