Jump to content

smarty help


steviez

Recommended Posts

Hi,

 

Im not sure if this is the correct forum so please tell me if its not.

 

I need to get my results to display in a horizontal row and have a max of 5 per row, Here is my code so far:

 

{section name=cat_loop loop=$cats}
        {section name=subcat_loop loop=$cats[cat_loop].subcats}
          <div class='profile_headline{if !$smarty.section.subcat_loop.first}2{/if}'><b>{lang_print id=$cats[cat_loop].subcats[subcat_loop].subcat_title}</b></div>

            <table cellpadding='0' cellspacing='0'>
            {* LOOP THROUGH FIELDS IN TAB, ONLY SHOW FIELDS THAT HAVE BEEN FILLED IN *}
            {section name=field_loop loop=$cats[cat_loop].subcats[subcat_loop].fields}
              <tr>
              <td valign='top' style='padding-right: 10px;' nowrap='nowrap'>
                {lang_print id=$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_title}:
              </td>
              <td>
        <div class='profile_field_value' style="{$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_style}">            {$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value_formatted}
		{if $cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_special == 1 && $cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value|substr:0:4 != "0000"} ({lang_sprintf id=852 1=$datetime->age($cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value)}){/if}
		</div>

              </td>
              </tr>
            {/section}
            </table>
        {/if}
        {/section}
      {/section}

 

Any help would be great!

Link to comment
https://forums.phpfreaks.com/topic/135115-smarty-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.