jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Topic started by: andrezones on 19.09.2018 20:28:05

Title: Problem with layout categories
Post by: andrezones on 19.09.2018 20:28:05
Hello, I have a website published with 5 categories and I'm using the "Sample with 4 columns" model, so far everything is up and running.
It turns out that I needed to increase a category, I now have 6 and in my frontend only appear 5. The name of the new one appears but the name of an older one does not.
I think it's a problem with the {cat_title4} tags because the new and old category is displayed as I click on Publish Category.
Layout:
(https://thumbs2.imgbox.com/ec/7d/Qe7hy7nx_t.jpg)

Categories
(https://thumbs2.imgbox.com/99/26/fFuKkC7m_t.jpg) (https://thumbs2.imgbox.com/0a/a4/GCB795Nm_t.jpg)

FrontEnd
(https://thumbs2.imgbox.com/42/37/IkRiVyeB_t.jpg) (https://thumbs2.imgbox.com/ae/0f/DS6lx5iT_t.jpg)
Title: Re: Problem with layout categories
Post by: ColinM on 20.09.2018 10:21:26
Hi
Think you are trying to make the 4 column layout into a 6 column one! That will not work!!. 
If you revert the layout back to the actual 4 column one then there will, in your case, be one row with 4 cats and a second row with 2 entries.When you tried to extend to 6 columns it would need more css and other thingsColin
Title: Re: Problem with layout categories
Post by: andrezones on 20.09.2018 14:03:23
Hi Colin, but I changed inside the layout the number of columns option for 5, 6, 7 and even then it does not work.
Is there any way to display the 6 categories at once?
Title: Re: Problem with layout categories
Post by: ColinM on 21.09.2018 18:44:31
Hi,
The number of Columns entry is only used to as a 'note' in the jd3.2 layouts. You need to change the layout itself.If you look at the layout it is split into sections for each part of the layout.  There are 4 entries per section in the 4 column version where each is the same except that the place-holder increase from 1 to 4 as in the code fragment below.
  <!-- cat titles -->
   <div class="jd_cats_4col_inner_wrapper" style="font-weight: bold;">
      <div class= "jd_cats_4col">{cat_title1}</div>
      <div class= "jd_cats_4col">{cat_title2}</div>
      <div class= "jd_cats_4col">{cat_title3}</div>
      <div class= "jd_cats_4col">{cat_title4}</div>
   </div>
Having reminded myself of the css content there is no need to change it! That is actually the css itself is not column dependent so the names can stay the same.  So for a 5 col version just add an extra line in each section as illustrated below for the cat title section
  <!-- cat titles -->
   <div class="jd_cats_4col_inner_wrapper" style="font-weight: bold;">
      <div class= "jd_cats_4col">{cat_title1}</div>
      <div class= "jd_cats_4col">{cat_title2}</div>
      <div class= "jd_cats_4col">{cat_title3}</div>
      <div class= "jd_cats_4col">{cat_title4}</div>      <div class= "jd_cats_4col">{cat_title5}</div>
   </div>
For six columns it needs 6 per section.
I have not tried but it should work.  The only caveat is if the base jD code supports such as {cat_title5} {cat_title6} and so on.
Colin
Title: Re: Problem with layout categories
Post by: andrezones on 21.09.2018 20:37:05
Thanks for the reply Collin.
I added the tag {cat_title6} and it did not work, even without touching anything else in the code or css.
It seems to me from the sixth category, it's like another page where the tags are the same.
No layout I've tried, displays more than 5 categories, the 6th always goes to a new page

Criei esse site para testes, é uma instalação nova, com todas as configurações padrões.
Veja que existe a paginação.
http://andre.joomla.com/index.php/download
Title: Re: Problem with layout categories
Post by: roon215 on 23.09.2018 03:59:51
Hello sir, having similar issues. What's the solution for the instant fix?
Thanks.
Roon
Title: Re: Problem with layout categories
Post by: ColinM on 23.09.2018 18:47:05
Whoops!  I missed a couple of points!! :( You do need to set the number of columns to the relevant number.  Also there is a CSS change.The css code sets the width so for six columns it needs to be 16% rather than the 25% used in the 4 column version
Add into jdownloads_custom.css the css below. And change all instances of .jd_cats_4col to .jd_cats_6colYou also need to ensure that the front end config allows showing at least 6 categories.
.jd_cats_6col {
    float: left;
    width: 16%;
    text-align: center;
    word-wrap: break-word;
    padding-right: 3px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

ColinActually if you are not a purist then just add into jdownloads_custom.css the css below and leave .jd_cats_4col .
.jd_cats_4col {
    width: 16%;}

Because jdownloads_custom.css is loaded last ythen the width is superceded.