Λίστα Κατηγοριών σε 2 στήλες Topic is solved

Moderator: geof

Locked
npeagr
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Oct 24, 2020 5:07 am

Λίστα Κατηγοριών σε 2 στήλες

Post by npeagr » Sat Oct 24, 2020 5:17 am

Γεια εγκατέστησα το abooks και στην λίστα των κατηγοριών (Τίτλοι βιβλίων) θέλω να βγαίνουν σε 2 στήλες

https://www.stekip.gr/stekip/library.html
ο κώδικας php είναι αυτός

Code: Select all

<table class="books">
<tbody>
<?php foreach($this->items as $id => $item) : ?>
        <?php
        if(!isset($this->items[$id + 1]))
        {
                $class = 'last';
        }
        ?>
        <tr>
        <td class="<?php echo $class; ?> folder">
	<h4 class="item-title">
        <?php echo str_repeat('<span class="indent"></span>', $item->level) ?>
        <?php $class = '';?>
        <?php if ($this->params->get('catimage')!="-1"){
		if($this->params->get('catimage')=='icon-folder'){?>
			<i class="icon-folder"></i>
		<?php }else{?>
                <?php $catimage=$this->params->get('catimage')== "cat_custom_image"?$item->params->get('image','components/com_abook/assets/images/no_img_cat.png') : "components/com_abook/assets/images/folder/".$this->params->get('catimage', "folder_blue.png"); ?>
                <img class="cat-img-folder" src="<?php echo $catimage; ?>" style="vertical-align:middle;" alt="<?php echo JText::_('COM_ABOOK_CATEGORY').' '.$this->escape($item->title); ?>" />
        	<?php }
	}?>
                        <a href="<?php echo JRoute::_(AbookHelperRoute::getCategoryRoute($item->slug));?>">
                        <?php echo $this->escape($item->title); ?></a>
                        <?php if ($this->params->get('show_item_count', 0) == 1) :?>
				<span class="badge badge-secondary tip" title="<?php echo JHtml::tooltipText('COM_ABOOK_NUM_ITEMS')?>">
					<?php echo $item->numitems; ?>
				</span>
                        <?php endif; ?>
			<?php if ($this->params->get('show_alt_title', 0) == 1) :?>
			<p><small><?php print_r($item->params->get('alt_title')); ?></small></p>
			<?php endif; ?>
           </h4>
                <?php if ($item->description && $this->params->get('show_list_description', 0) == 1): ?>
                        <div class="category-desc">
                                <?php echo JHtml::_('content.prepare', $item->description); ?>
                        </div>
                <?php endif; ?>
                <?php /*if(count($item->getChildren()) > 0) :
                        $this->items[$item->id] = $item->getChildren();
                        $this->parent = $item;
                        $this->maxLevel--;
                        echo $this->loadTemplate('items');
                        $this->parent = $item->getParent();
                        $this->maxLevel++;
                endif; */?>
        </td>
        </tr>
<?php endforeach; ?>
</tbody>
</table>
Μπορεί κάποιος να μου πει πως θα το κάνω να βγαίνουν σε στήλες ?
Ευχαριστώ πολύ

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by changlee » Sat Oct 24, 2020 1:38 pm

To abooks είναι component;
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

npeagr
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Oct 24, 2020 5:07 am

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by npeagr » Sat Oct 24, 2020 2:47 pm

Ναι ειναι το alexandria book library https://alexandriabooklibrary.org και δεν εχει καμια επιλογη για κατι τετοιο και επειδη ειναι free εφαρμογή δεν εχει σχεδον καθολου υποστηριξη

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by changlee » Sat Oct 24, 2020 4:47 pm

Άρα η σελίδα https://www.stekip.gr/stekip/library.html καλεί το component?

Από ότι βλέπω έχεις μια λίστα με pagination σελιδοποίηση. Τι ακριβώς χρειάζεσαι;

Συνήθως τις λίστες με σελιδοποίηση δεν τις κάνουμε δίστηλες ή τρίστηλες, αλλά αλλάζουμε την ποσότητα σελιδοποίησης.
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

npeagr
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Oct 24, 2020 5:07 am

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by npeagr » Sat Oct 24, 2020 5:36 pm

Ευχαριστω για την απαντηση

Επειδη ειναι πολλα τα βιβλια και πολλες οι κατηγοριες θελω μονο στην πρωτη σελιδα να βγαινουν σε 2 στηλες για να μην εχω πολλα pagination και για πιο ομορφο.

Βεβαια το ιδανικοτερο θα ηταν να εχω image cover και απο κατω ο τιτλος κατι σαν grid ή list επιλογη.

Ο κωδικας ειναι στο /components/com_abook/views/gategories/tmpl/
Εννοειτε εχω κανει overwrite στο template

Ευχαριστω

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by changlee » Sun Oct 25, 2020 5:26 pm

Από ότι φαίνεται, το κατάφερες.
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

npeagr
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Oct 24, 2020 5:07 am

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by npeagr » Sun Oct 25, 2020 5:49 pm

Ναι το εκανα με css αλλα εχω θεμα με τις μονες κατηγοριες, δηλαδη οταν ειναι 30, 3 σελιδες ολα καλα.

Image

αλλα οταν γινουν 31 οι κατηγοριες και οι σελιδες 4 τοτε η μονη τελευταια σπαει στα 2

Image

βλεπω στον κωδικα μια php class last αλλα δεν μπορω να βαλω μια κλαση css για να ειναι μονη η στηλη

Μπορεις να βοηθησεις σε αυτο ?
Το css μου ειναι

.category-books {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-column-gap: 40px;
column-gap: 40px;
-moz-column-gap: 40px;
}
Τωρα εκλεισα μια κατηγορια για να δειχνει οκ

ευχαριστω

npeagr
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Oct 24, 2020 5:07 am

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by npeagr » Sun Oct 25, 2020 6:47 pm

Τελικα το βρηκα τι εφταιγε .. ειχε float left το image

ολα καλα τωρα .. μην κλεινεις το τοπικ μεχρι να σε ενημερωσω ... μην και σκασει κατι αλλο

Ευχαριστω

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by changlee » Mon Oct 26, 2020 8:52 am

Καλά το πας. Προχώρα.
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

npeagr
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Oct 24, 2020 5:07 am

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by npeagr » Mon Oct 26, 2020 10:21 am

xaxax τελειωσα ολα οκ και οι ετικετες της βιβλιοθηκης ... πολυ custom αλλα αξιζε, κλεισε τοπικ αν θελεις

Ευχαριστω

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Λίστα Κατηγοριών σε 2 στήλες

Post by changlee » Mon Oct 26, 2020 10:47 am

Μπράβω! ο σωστός ο τζουμλατζής όλα τα μαστορεύει.

Δεν κλείνω εγώ θέματα, αλλά οι διαχειριστές.
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com


Locked

Return to “Joomla! 3.x”