Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Support / AdsManager Support / [RESOLVED] Category layout

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

[RESOLVED] Category layout

More
11 years 1 month ago - 11 years 1 month ago #14494 by raph17
[RESOLVED] Category layout was created by raph17
I work on a category layout and i need some code.Is there a way to display some specific fields only from list display columns?
I need to display the column between div not tr.

I need to display column with price on one div , data on another div , and some specific fields on another div.
Can this be done?
Last edit: 11 years 1 month ago by loic.
More
11 years 1 month ago #14536 by loic
Replied by loic on topic Category layout
Hello,

You can do an override of the default_list view if you wish to customize this view.

After that you will be able to display this view as you see fit.

Best regards.
The following user(s) said Thank You: raph17
More
11 years 1 month ago #14538 by raph17
Replied by raph17 on topic Category layout
I did but all data are in one div :( I want to create separate divs for price and other fields
More
11 years 1 month ago #14700 by loic
Replied by loic on topic Category layout
Hello,

Could you copy-paste the code here ?

Best regards.
More
11 years 1 month ago #14727 by raph17
Replied by raph17 on topic Category layout
<?php
/**
 * @package		AdsManager
 * @copyright	Copyright (C) 2010-2014 Juloa.com. All rights reserved.
 * @license		GNU/GPL
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );
?>
<div class="container-fluid">
<div class="adsmain-list">   
<?php
$lang = JFactory::getLanguage();
$tag = $lang->getTag();
foreach($this->contents as $content) 
{
    $linkTarget = TRoute::_( "index.php?option=com_adsmanager&view=details&id=".$content->id."&catid=".$content->catid);
    if (function_exists('getContentClass')) 
        $classcontent = getContentClass($content,"list");
    else
        $classcontent = "";
    ?>   
    <div class="ads-list span12 <?php echo $classcontent;?> ad_<?php echo $content->catid?>"> 
 
        <div class="span4 ads-listimg">
 
            <?php
            if (isset($content->images[0])) {
                    echo "<a href='".$linkTarget."'><img class='ad-image' name='ad-image".$content->id."' src='".$this->baseurl."images/com_adsmanager/ads/".$content->images[0]->thumbnail."' alt=\"".htmlspecialchars($content->ad_headline)."\" /></a>";
            } else if ($this->conf->nb_images > 0) {
                    echo "<a href='".$linkTarget."'><img class='ad-image' src='".ADSMANAGER_NOPIC_IMG."' alt='nopic' /></a>";
            }
            ?>
 
        </div>
	<div class="span8">
					<h2>
						<?php echo   '<a href="'.$linkTarget.'"><span class="cat-title1">'.$content->ad_manufacturers.' '.$content->ad_modelauto.' '.$content->ad_model.'</span> <span class="cat-title2">'.JText::_('ADSMANAGER_DETAILPAGE_TITLE').' '.$content->ad_kindof.'  '.$content->cat.' </span> </a>' ?>
 
					</h2>
            <div class="adsdesc-list span8">
 
<?php
    if ($tag == 'ro-RO')
    { ?>
 <?php          
$content->ad_text = str_replace ('<br />'," ",$content->ad_textro);
                $af_text = JString::substr($content->ad_textro, 0, 500);
                if (strlen($content->ad_textro)>500) {
                    $af_text .= "[...]";
                }
                echo $af_text;    
?> 
  <?php }
?> 
            </div></div>
        <?php 
            foreach($this->columns as $col) {
                echo '<div class="adfield_'.$col->id.' hidden-phone">';
                if (isset($this->fColumns[$col->id]))
                    foreach($this->fColumns[$col->id] as $field)
                    {
                        $c = $this->field->showFieldValue($content,$field); 
                        if (($c !== "")&&($c !== null)) {
                            $title = $this->field->showFieldTitle(@$content->catid,$field);
                            echo "<span class='".$field->name."'>";
                            if ($title != "")
                                echo "<b>".htmlspecialchars($title)."</b>: ";
                            echo "$c<br/>";
                            echo "</span>";
 
 
                        }
                    }
                echo "</div>";
            }
        ?>
 
        <?php if(!isset($this->conf->display_column_date) || $this->conf->display_column_date == 1): ?>
        <div class="data hidden-phone">
            <?php 
            $iconflag = false;
            if (($this->conf->show_new == true)&&($this->isNewcontent($content->date_created,$this->conf->nbdays_new))) {
                    echo "<div class='text-center'><img alt='new' src='".getImagePath('new.gif')."' /> ";
                $iconflag = true;
            }
            if (($this->conf->show_hot == true)&&($content->views >= $this->conf->nbhits)) {
                if ($iconflag == false)
                        echo "<div class='text-center'>";
                echo "<img alt='hot' src='".getImagePath('hot.gif')."' />";
                $iconflag = true;
            }
            if ($iconflag == true)
                echo "</div>";
            if(!isset($this->conf->display_column_date_date) || $this->conf->display_column_date_date == 1){
                echo $this->reorderDate($content->date_created);
            }
            ?> 
            <br />
            <?php
            if ($content->userid != 0 && (!isset($this->conf->display_column_date_user) || $this->conf->display_column_date_user == 1))
            {
               echo JText::_('ADSMANAGER_FROM')." "; 
 
               $target = TLink::getUserAdsLink($content->userid);
 
               if ($this->conf->display_fullname == 1)
                    echo "<a href='".$target."'>".$content->fullname."</a><br/>";
               else
                    echo "<a href='".$target."'>".$content->user."</a><br/>";
            }
            ?>
            <?php 
            if(!isset($this->conf->display_column_date_view) || $this->conf->display_column_date_view == 1){
                echo sprintf(JText::_('ADSMANAGER_VIEWS'),$content->views);
            }
            ?>
            <?php if(isset($this->conf->favorite_enabled) && $this->conf->favorite_enabled == 1 && ($this->conf->favorite_display == 'all' || $this->conf->favorite_display == 'list')): ?>
                <br/>
                <?php
                    $favoriteClass = '';
                    $favoriteLabel = addslashes(JText::_('ADSMANAGER_CONTENT_FAVORITE'));
                    if(array_search($content->id, $this->favorites) !== false){
                        $favoriteClass = ' like_active';
                        $favoriteLabel = addslashes(JText::_('ADSMANAGER_CONTENT_FAVORITE_DELETEMSG'));
                    }
                ?>
                    <button id="like_<?php echo $content->id; ?>" class="btn favorite_ads like_ad<?php echo $favoriteClass; ?>"><?php echo $favoriteLabel; ?></button>
            <?php endif; ?>
        </div>
        <?php endif; ?>
    </div>
<?php	
}
?>
    </div>
</div>
More
11 years 1 month ago #14745 by loic
Replied by loic on topic Category layout
Hello,

I don't what can cause the display you have.

Did you try to play with the span4 and span8 ?
Also, instead of a span12 after the foreach, try to replace it by a row-fluid or a row.

Best regards.
Time to create page: 0.052 seconds
Powered by Kunena Forum