Author Topic: Changing the home page  (Read 45 times)

Offline axip

  • Sr. Member
  • ****
  • Posts: 15
  • Karma: +0/-0
Changing the home page
« on: June 12, 2017, 05:28:24 AM »
Hello,

I'm currently setting script ...
I am in France, and I translated the whole ...

But I have a request to make you.
Indeed, I would like to see all the categories and sub-categories on the home page of the site without there being sites referenced in the categories.
I think for the visitors, it will be more speaking.

Do you have a solution ?

Thanks a lot for your help.

cordially

Offline alexa

  • Administrator
  • Hero Member
  • *****
  • Posts: 449
  • Karma: +7/-1
Re: Changing the home page
« Reply #1 on: June 13, 2017, 05:21:08 PM »
I'll send you file tomorrow. Regards

Offline alexa

  • Administrator
  • Hero Member
  • *****
  • Posts: 449
  • Karma: +7/-1
Re: Changing the home page
« Reply #2 on: June 14, 2017, 02:50:20 AM »
1. Upload index.php [attachment]

2. In themes/YOURTHEME/main.php

replace this code:

Code: [Select]
<div class="ten1140">
<div class="seven column">
<div class="lineBreaks">{#websitecat#}</div>
<div class="field">
{foreach from=$categori item=cat}
<div class="threehalf">
<h4>
<img class="correcter" src="{$sitepath}/themes/icons/{$cat.catimage}" alt="{$cat.name}" width="24" height="24" />
{if $rewritemod == 1}
<a href="{$sitepath}/{$cat.catid}.htm" title="{$cat.name}">
{/if}
{if $rewritemod == 2}
<a href="{$sitepath}/category.php?id={$cat.catid}" title="{$cat.name}">
{/if}
{$cat.name|stripslashes|truncate:85}[{$cat.counter}]</a></h4>
<br />
</div>
{/foreach}
</div>

with this code:

Code: [Select]
<div class="ten1140">
<div class="seven column">
<div class="lineBreaks">{#websitecat#}</div>
<div class="field">
<div id="columns">
{foreach from=$categori item=cat}
<figure>
<h4><img class="correcter" src="{$sitepath}/themes/icons/{$cat.catimage}" alt="{$cat.name}" width="24" height="24" />
{if $rewritemod == 1}
<a href="{$sitepath}/{$cat.catid}.htm" title="{$cat.name}">
{/if}
{if $rewritemod == 2}
<a href="{$sitepath}/category.php?id={$cat.catid}" title="{$cat.name}">
{/if}
{$cat.name|stripslashes|truncate:85}[{$cat.counter}]</a></h4>
{foreach from=$subcat item=catsy}
{if $cat.catid == $catsy.parent}
{if $rewritemod == 1}
<a href="{$sitepath}/{$catsy.catid}.htm" title="{$catsy.name}">{$catsy.name}[{$catsy.counter}]</a>
{/if}
{if $rewritemod == 2}
<a href="{$sitepath}/category.php?id={$catsy.catid}" title="{$catsy.name}">{$catsy.name}[{$catsy.counter}]</a>
{/if}
{/if}
{/foreach}
</figure>
{/foreach}
</div>
</div>

3. Edit themes/YOURTHEME/styles/style.css. at the end of file put this:

Code: [Select]
#columns{column-width:240px;column-gap:15px;width:100%;margin:0 auto}
div#columns figure{padding-bottom:10px;display:inline-block;column-break-inside:avoid}
div#columns figure figcaption{font-size:.9rem;color:#444;line-height:1.5}
div#columns small{font-size:1rem;float:right;text-transform:uppercase;color:#aaa}
div#columns small a{color:#666;text-decoration:none;transition:.4s color}
@media screen and (max-width: 750px) {
#columns{column-gap:0}
#columns figure{width:100%}
}

« Last Edit: June 14, 2017, 02:55:03 AM by alexa »

Offline axip

  • Sr. Member
  • ****
  • Posts: 15
  • Karma: +0/-0
Re: Changing the home page
« Reply #3 on: June 14, 2017, 10:46:14 AM »
Hello,

Great !!
Thank you very much...
Very effective !!

Good evening