how to change columns display in item layout template

9 years 3 weeks ago #4074 by mountain
Dear all,
I have modified the item.php as below to one column:
<?php if (isset($this->item->positions)) : ?>
<!-- BOF top block -->
<div class="infoblock <?php echo $this->params->get('top_cols', 'one'); ?>cols">
<?php foreach ($this->item->positions as $field) : ?>
<?php if ($field->label) : ?>
<div class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></div>
<?php endif; ?>
<div class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div>
<?php endforeach; ?>
<!-- EOF top block -->
<?php endif; ?>

I also modified the item.xml to one column:
<param name="top_cols" type="list" default="one" label="FLEXI_ITEM_TOP_COLS" description="FLEXI_ITEM_TOP_COLS_DESC">
<option value="">Use Global</option>
<option value="one">FLEXI_1_COL</option>
<option value="two">FLEXI_2_COLS</option>

But why it still show 2 columns in the top position in the item layout of default template?
I have cleared the cache and refresh the web page, it is still same.

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

9 years 3 weeks ago #4076 by orchid1
<div class="infoblock <?php echo $this->params->get('top_cols', 'one'); ?>cols">

check the css you'll need to modify it :)

“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.” William A. Foster - USMC

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

4 years 1 month ago #52189 by josegfilippa

I just come up to the same problem... Try to put fields in the TOP area into just one column.

The goods are that you do not need to modify any file. It is all done through the settings:

1. Into the Flexicontent dashboard go to Types.
2. Now in the Types list, click the type assigned to the articles you want to have fields displayed into one column in order to edit its settings. If you did not create any new type, this should be the default 'Article' type.
3. Once inside the type settings, scroll down and expand the last item "Layout Configuration for: assigned_item_layout_name" (where assigned_item_layout_name is the name of the item layout assigned for this type)
4. Here you can change several settings for the layout. Just change "Top columns" selected value from "2 columns" to "1 column".
5. Click "Save & Close" icon, clean cache, and that's all. You can customize the style of labels and values by editing the "item.css" file. You can use Firefox with Firebug (Inspect element with Firebug) to play with the css settings and see the changes before actually doing them.

Kind regards from Argentina.

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.