|
|
#1 |
|
Junior Member
Join Date: Aug 2008
Posts: 18
Rep Power: 5 ![]() |
I've been working on formatting the home page of my classifieds without using the table columns. This way each category with subcategories can float in their own div...I'm finding this allows a cleaner look for what I'm after. I made the following change to the code on the home.tpl and was hoping someone could tell me if this is correct or needs some changes. It does look fine on the site.
HTML Code:
<table class="main" width="100%"> <tr> <th>{$smarty.const.LANG_BROWSE_CATEGORY}</th> </tr> <tr> <td valign="top"> {section name=tr loop=$data step=$cols} {section name=td start=$smarty.section.tr.index loop=$smarty.section.tr.index+$cols} <div class="categoryhome"> {if $data[td]<>""} {$data[td].start_link}<img src="{$data[td].image}" border="0" alt="{$data[td].name}" /></a> {$data[td].start_link}<strong>{$data[td].name}</strong></a> {if $data[td].total <> ''} ({$data[td].total}) {/if} {$data[td].subcats} {$data[td].description} {/if} </div> {/section} {/section} </td> </tr> </table>
__________________
Developer-v4.1.5 | Steinbach Free Classifieds |
|
|
|
|
|
#2 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,208
Rep Power: 122 ![]() |
It looks correct to me. Just from glancing at it you may want to put the categoryhome div inside the if($data[td']) just incase it is blank. But I think that is required.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2008
Posts: 18
Rep Power: 5 ![]() |
Thanks much!
__________________
Developer-v4.1.5 | Steinbach Free Classifieds |
|
|
|
|
|
#4 |
|
All Hands On Deck
Join Date: Mar 2008
Posts: 1,344
Rep Power: 33 ![]() |
The problem is does it look fine on various browsers. Does it validate as XHTML transitional The W3C Markup Validation Service. Posting a link would help to get more feedback.
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Aug 2008
Posts: 18
Rep Power: 5 ![]() |
So far my testing shows good browser compatability and it does validate as XHTML transitional
Classifieds Site I haven't finished yet...but getting there...
__________________
Developer-v4.1.5 | Steinbach Free Classifieds Last edited by freeze2; 08-28-2009 at 10:46 PM. |
|
|
|
|
|
#6 |
|
All Hands On Deck
Join Date: Mar 2008
Posts: 1,344
Rep Power: 33 ![]() |
Looks good on Firefox and safari. It validates too XHTML transitional.
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Aug 2008
Posts: 18
Rep Power: 5 ![]() |
Thanks...I hadn't tested on Safari.
I did have to add a "display: inline" to the main div to fix an ie6 float problem...but other than that I'm pleased with the outcome. One problem with using floating divs for the category layout is that you have to watch the order in which they are placed....you have to make sure to keep the categories with the most subcategories to the left to have them fall into place nicely...
__________________
Developer-v4.1.5 | Steinbach Free Classifieds |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jul 2009
Posts: 21
Rep Power: 1 ![]() |
Would be nice if added to the script by default or make it possible to edit from templates, not healthy to modify core files, it makes upgrades more complicated ..
|
|
|
|
|
|
#9 |
|
Staff
Join Date: Mar 2006
Posts: 415
Rep Power: 23 ![]() |
Typically, you don't have to overwrite files located in the templates folder during an upgrade.
|
|
|
|
|
|
#10 |
|
All Hands On Deck
Join Date: Mar 2008
Posts: 1,344
Rep Power: 33 ![]() |
It is not a core file. He is putting this in a template folder - home.tpl . By all accounts you should copy the default template folder when you first install and call it something else. You then modify this new template folder with peace of mind. The documentation on how templates work is pretty clear. If a file exists in your new template folder it will be used but if it does not exist it will default to the DEFAULT. This way if you make a real hash of things you simply delete your version of the template file and it will pick up the default and bring you back to normal.
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with divs | martini55 | HTML, CSS, and Design Help | 5 | 06-15-2009 01:44 PM |
| placing a video on my about us page or the home page?? | apotrader | v4 Questions & Support | 4 | 11-04-2008 10:11 PM |
| Control width of table columns in category table | domino | HTML, CSS, and Design Help | 2 | 09-07-2008 08:37 AM |
| Disable image on Table Page | barrysmith | v3.1 Questions & Support | 16 | 09-30-2006 11:46 AM |
| Adding Feature Item Table to HTML Page | art | HTML, CSS, and Design Help | 11 | 08-05-2006 03:10 AM |