Ivan

Extra fileds display

29 posts in this topic

Hi Ivan.

I'm sorry, it is my mistake.

I change the code

foreach($item->extra_fields as $key => &$ex){

$ex->name = $rs[$key]->name;

}

in file /classes/k2.php

to

foreach($item->extra_fields as $key => &$e){

$e->name = $rs[$key]->name;

}

Problem is i use same variable name $ex with before foreach but pass it by reference (as you see in second foreach i have & before $ex)

That is professional issue, so i won't explain more.

I'm sorry for my amateur.

Great job thank you very much, You are the best. Is there something that I can do with code so I can apply special css for each extrafiled. Now I have two extra fields like this:


<div class="item-extrafield">
<p>Za period:15.04 - 21.10.2015</p>
<p>Cijena:160,00 EUR</p>
</div>
[/CODE]

and will like to add diffrent css for those two extra fileds. What can I do about that.

Share this post


Link to post
Share on other sites

We should change the code a little to create this HTML structure

<div class="item-extrafield">
<p><span>Za period</span>: 15.04 - 21.10.2015</p>
<p><span>Cijena</span>:160,00 EUR</p>
</div>[/CODE]

I'm sure that you know how to create it.

And this is CSS rule we need to use

[CODE].item-extrafield p:first-child{
/** style for first p here, for example: **/
color: #f20000;
}

.item-extrafield p:last-child{
/** style for second p here **/
color: #000000;
}
.item-extrafield p span{
font-weight: bold;
}
/** and more if you want **/
.item-extrafield p:last-child span{
font-size: 60px;
}
[/CODE]

You can add these rule to file /templates/bt_property/html/mod_bt_contentshowcase/default/css/btcontentshowcase.css

Cheers

Share this post


Link to post
Share on other sites

We should change the code a little to create this HTML structure

<div class="item-extrafield">
<p><span>Za period</span>: 15.04 - 21.10.2015</p>
<p><span>Cijena</span>:160,00 EUR</p>
</div>[/CODE]

I'm sure that you know how to create it.

And this is CSS rule we need to use

[CODE].item-extrafield p:first-child{
/** style for first p here, for example: **/
color: #f20000;
}

.item-extrafield p:last-child{
/** style for second p here **/
color: #000000;
}
.item-extrafield p span{
font-weight: bold;
}
/** and more if you want **/
.item-extrafield p:last-child span{
font-size: 60px;
}
[/CODE]

You can add these rule to file /templates/bt_property/html/mod_bt_contentshowcase/default/css/btcontentshowcase.css

Cheers

[url=""][/url]I am so sorry that I do not how to change html structure but with your guide of CSS, I think I can get what I want. If you had time to arrange structure I would appreciate. But thank you anyway cose you helped a lot. And this feature what you helped me to show extra fields would be very nice thing in standard component package.

Share this post


Link to post
Share on other sites