GetSimple Support Forum
gallery in component - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: gallery in component (/showthread.php?tid=4736)



gallery in component - tigre - 2013-05-12

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.


RE: gallery in component - mvlcek - 2013-05-12

(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.


RE: gallery in component - tigre - 2013-05-12

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.


RE: gallery in component - sarnaiz - 2015-01-16

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


RE: gallery in component - sarnaiz - 2015-01-16

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.


RE: gallery in component - shawn_a - 2015-01-18

I added \[php\] code tags


RE: gallery in component - sarnaiz - 2015-01-20

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


RE: gallery in component - shawn_a - 2015-01-20

I edited your post your code was normal text. Use code tags when posting code so it is highlighted.


RE: gallery in component - sarnaiz - 2015-01-20

Ok. Thanks! I reviewed the post to see what you were referring to.


RE: gallery in component - datiswous - 2015-01-21

I wonder if you need the { and } in the get component code


RE: gallery in component - sarnaiz - 2015-01-25

(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