CATEGORIES on home page. How to?

Discussion in 'TemplateCodes' started by ebee, Aug 29, 2011.

  1. ebee Customer

    This may be a silly question but I need to display categories (browse) on home page just below database content. Any easy way to achieve this? I am using Sigma Green template. I tried use of "include" function but may be I was not doing it right hence I had no success. Thanks!
  2. Mike-N-Tosh Owner

    Why not copy the code from the default home.tpl page file into your current template home.tpl file?
  3. ebee Customer

    Could you kindly let us know paths for both files please? Thanks.
  4. seymourjames All Hands On Deck

    Open the home.tpl file within each of the Sigma template folders you are using as Mike says and copy the relevant code from the home.tpl file which sits in the default template. I am not sure how this can be described more simply. All individual template folders are contained within the templates folder. In other words put this into your sigma template home.tpl file:

    PHP:
    <table class="main" width="100%">
            <
    tr>
                <
    td>
                
                <
    table width="100%">
                {
    section name=tr loop=$data step=$cols}
                    <
    tr>
                        {
    section name=td start=$smarty.section.tr.index loop=$smarty.section.tr.index+$cols}
                        <
    td valign="top">
                        {if 
    $data[td]<>""}
                            {
    $data[td].start_link}<img src="{$data[td].image}border="0" alt="{$data[td].name}/></a>&nbsp;
                            {
    $data[td].start_link}<strong>{$data[td].name}</strong></a>
                            {if 
    $data[td].total <> ''}
                            ({
    $data[td].total})
                            {/if}
                            <
    br />
                            <!--{
    $data[td].subcats}-->
                            {
    $data[td].description}
                        {/if}
                        &
    nbsp;
                        </
    td>
                        {/
    section}
                    </
    tr>
                {/
    section}
                </
    table>
                
                </
    td>
            </
    tr>
        </
    table>
    1 people like this.
  5. ebee Customer

    Thanks a lot it works now as I expected. I kind of knew where to paste code but wasn't sure where to copy it from. Now I have also added WEB DEVELOPER add-on in Firefox so that helps a bit as well.
    best regards
  6. seymourjames All Hands On Deck

    No problem. You should take a look at the online 68C documentation to understand how templates work.

Share This Page