Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gallery in component
#1
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.
Reply
#2
(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.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
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.
Reply
#4
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
Reply
#5
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.
Reply
#6
I added \[php\] code tags
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
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
Reply
#8
I edited your post your code was normal text. Use code tags when posting code so it is highlighted.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
Ok. Thanks! I reviewed the post to see what you were referring to.
Reply
#10
I wonder if you need the { and } in the get component code
Reply
#11
(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
Reply




Users browsing this thread: 1 Guest(s)