- Posts: 12817
- Thank you received: 1659
All popular questions related to OS Property will be posted here
How to show each extra field in one line
- Mr. Dam
- Topic Author
- Away
- Administrator
Less
More
10 years 3 months ago #48622
by Mr. Dam
How to show each extra field in one line was created by Mr. Dam
Hi,
Some customers asked us that they want to show each extra field in one line in Property details page (Like attachment). Good news is you are able to do it by modifying the Details layout of your current using theme.
Please open file
components > com_osproperty > templates > your_current_template > details.html.tpl.php
find this
Above code to show 3 extra fields in one line. You can use bellow code to show 2 extra fields in one line
You can use bellow code to show 1 extra field in one line
Good luck
Ossolution team
Some customers asked us that they want to show each extra field in one line in Property details page (Like attachment). Good news is you are able to do it by modifying the Details layout of your current using theme.
Please open file
components > com_osproperty > templates > your_current_template > details.html.tpl.php
find this
Code:
<?php
$k = 0;
for($j=0;$j<count($fields);$j++){
$field = $fields[$j];
$k++;
?>
<div class="span4" style="margin-left:0px;">
<i class="osicon-ok"></i>
<?php
if($field->displaytitle == 1){
?>
<?php
if($field->field_description != ""){
?>
<span class="editlinktip hasTip" title="<?php echo $field->field_label;?>::<?php echo $field->field_description?>">
<?php echo $field->field_label;?>
</span>
<?php
}else{
?>
<?php echo $field->field_label;?>
<?php
}
}
?>
: <?php echo $field->value;?>
</div>
<?php
if($k == 3){
?>
<div class="clearfix"></div>
<?php
$k = 0;
}
}
}
?>
Above code to show 3 extra fields in one line. You can use bellow code to show 2 extra fields in one line
Code:
<?php
$k = 0;
for($j=0;$j<count($fields);$j++){
$field = $fields[$j];
$k++;
?>
<div class="span6" style="margin-left:0px;">
<i class="osicon-ok"></i>
<?php
if($field->displaytitle == 1){
?>
<?php
if($field->field_description != ""){
?>
<span class="editlinktip hasTip" title="<?php echo $field->field_label;?>::<?php echo $field->field_description?>">
<?php echo $field->field_label;?>
</span>
<?php
}else{
?>
<?php echo $field->field_label;?>
<?php
}
}
?>
: <?php echo $field->value;?>
</div>
<?php
if($k == 2){
?>
<div class="clearfix"></div>
<?php
$k = 0;
}
}
}
?>
You can use bellow code to show 1 extra field in one line
Code:
<?php
$k = 0;
for($j=0;$j<count($fields);$j++){
$field = $fields[$j];
$k++;
?>
<div class="span12" style="margin-left:0px;">
<i class="osicon-ok"></i>
<?php
if($field->displaytitle == 1){
?>
<?php
if($field->field_description != ""){
?>
<span class="editlinktip hasTip" title="<?php echo $field->field_label;?>::<?php echo $field->field_description?>">
<?php echo $field->field_label;?>
</span>
<?php
}else{
?>
<?php echo $field->field_label;?>
<?php
}
}
?>
: <?php echo $field->value;?>
</div>
<div class="clearfix"></div>
?>
}
}
?>
Good luck
Ossolution team
The following user(s) said Thank You: Philipp, Szabó Zsolt
Please Log in or Create an account to join the conversation.
- Szabó Zsolt
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 1
9 years 8 months ago #60643
by Szabó Zsolt
Replied by Szabó Zsolt on topic How to show each extra field in one line
Hi Dam,
Can you help me which one is my_current_template? I use OSPholiday.
I found this directories
blue default theme1 theme2 theme3 theme_black
at components > com_osproperty > templates >
Thanks,
Zsolt
Can you help me which one is my_current_template? I use OSPholiday.
I found this directories
blue default theme1 theme2 theme3 theme_black
at components > com_osproperty > templates >
Thanks,
Zsolt
Please Log in or Create an account to join the conversation.
- Szabó Zsolt
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 1
9 years 8 months ago #60656
by Szabó Zsolt
Replied by Szabó Zsolt on topic How to show each extra field in one line
Hi,
Thanks, we found it the directory Blue.
Zsolt
Thanks, we found it the directory Blue.
Zsolt
Please Log in or Create an account to join the conversation.
- Rovshan
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
9 years 5 months ago #65090
by Rovshan
Replied by Rovshan on topic How to show each extra field in one line
hello.could you change for me this file.i want extra fields with 1 line.
i cant find with notepad replaced files
if possible atach this file
details.html.tpl.php
i cant find with notepad replaced files
if possible atach this file
details.html.tpl.php
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.