Keyword

Remove Column layout control handled by K2

More
12 years 11 months ago #100246 by Vinod
Hello,

I need help with this is it possible to remove column layout control handled by K2, Let me explain, i created the gallery like 3 column layout for my category view 3 columns where created in backend setting on category,

but i m trying to create responsive layout to feet any resolution, for that i will float my divs to left and that will automatically create the 1/2/3/4 column layout as per resolution of use screen, i want to remove that control on category in backend

 

please can it possible ?

thanks

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 11 months ago #100247 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Remove Column layout control handled by K2
Hi Vinod,

 

K2 calculates the with of each item automatically using the value you added at the backend setting. You can see how it works in the components/com_k2/templates/default/category.php below the <div id="itemListLeading">

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #100248 by Vinod
Replied by Vinod on topic Remove Column layout control handled by K2
Hello Kannan

thanks for the reply can you please show me the how i can modify this code

 

<?php if(isset($this->primary) && count($this->primary)): ?>        <!-- Primary items -->        <div id="itemListPrimary">            <?php foreach($this->primary as $key=>$item): ?>                        <?php            // Define a CSS class for the last container on each row            if( (($key+1)%($this->params->get('num_primary_columns'))==0) || count($this->primary)<$this->params->get('num_primary_columns') )                $lastContainer= ' itemContainerLast';            else                $lastContainer='';            ?>                        <div class="itemContainer<?php echo $lastContainer; ?>"<?php echo (count($this->primary)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('num_primary_columns'), 1).'%;"'; ?>>                <?php                    // Load category_item.php by default                    $this->item=$item;                    echo $this->loadTemplate('item');                ?>            </div>            <?php if(($key+1)%($this->params->get('num_primary_columns'))==0): ?>            <div class="clr"></div>            <?php endif; ?>            <?php endforeach; ?>            <div class="clr"></div>        </div>        <?php endif; ?>

thanks in advance..

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 11 months ago #100249 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Remove Column layout control handled by K2
How do you plan to set the width of the each <div class="itemContainer"> if you want to achieve the fluid layout ? Furthermore, how do u plan to get the users screen resolution ?

You can remove the controller or just remove the <div class="clr"></div> but it will not show the itemContainer equally without a width value, unless you're using an image only display.

 

Correct me if i'm wrong.

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

More
12 years 11 months ago #100250 by Vinod
Replied by Vinod on topic Remove Column layout control handled by K2
i can understand what do mean, but to give a try what i want to achieve i need to remove those controllers, unfortunately i don't know how to do that, can you please provide the sample code ?

thats will be great help..

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum