how to change columns display in item layout template

More
14 years 9 months 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">
<ul>
<?php foreach ($this->item->positions as $field) : ?>
<li>
<div>
<?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>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
<!-- 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>
</param>


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.
Thanks!

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

More
14 years 9 months ago #4076 by orchid1
Code:
<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.

More
9 years 10 months ago #52189 by josegfilippa
Hi,

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
Time to create page: 0.422 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline