I have approximately company 50 records. I have in the content of the page:
{CompanyDirectory pagelimit="10"}
This calls the first 10 companies but there is no pagination to navigate to the next set of records. Is there pagination in the admin view? I do not get any pagination there either.
Using {get_template_vars} I can see that the pagecount = 0.
From the {get_template_vars}:
CompanyDirectory = Object
items = Array (10)
itemcount = 10
pagination = Object
pagetext = Page
oftext = Of
pagecount = 0
curpage = 1
hierarchy_list = Array (3)
Is anyone else having this problem or ideas on what is wrong? CompanyDirectory is just about perfect for the project but I really need pagination to work.
Thank you,
Alane
This is the code of the Summary template I am using:
Code: Select all
{if isset($messages)}
<div class="CompanyDirectoryMessage">
<ul>
{foreach from=$messages item='one'}
<li>{$one}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($errors)}
<div class="CompanyDirectoryError">
<ul>
{foreach from=$errors item='one'}
<li>{$one}</li>
{/foreach}
</ul>
</div>
{/if}
{if isset($items)}
{if isset($firstlink) || isset($nextlink)}
<div>
{if isset($firstlink)}{$firstlink} {$prevlink} {/if}{$pagetext} {$curpage} {$oftext} {$pagecount}
{if isset($nextlink)} {$nextlink} {$lastlink}{/if}
</div>
{/if}
<table class="CompanyDirectory">
<thead>
<th>Name</th>
<th>Categories</th>
<th>Market</th>
<th>Contact</th>
</thead>
{foreach from=$items item=entry}
<tr class="CompanyDirectoryItem">
<!-- {$entry|print_r}-->
<td class="title"><h3><a href="{$entry->detail_url}">{$entry->company_name}</a></h3>
{if $entry->address ne ''}{$entry->address}<br />{/if}
</td>
<td class="categories"><em>{foreach from=$entry->categories item="category" name="categories"}
<a href="{$category->url}">{$category->name}</a>{if $smarty.foreach.categories.last}{else}, {/if}
{/foreach}</em><br />
{if $entry->fields.Wholesale->value == "true" && $entry->fields.Retail->value == "true"}Wholesale & Retail{/if}
{if $entry->fields.Wholesale->value == "true" && $entry->fields.Retail->value == "false"}Wholesale Only{/if}
{if $entry->fields.Wholesale->value == "false" && $entry->fields.Retail->value == "true"}Retail Only{/if}
</td>
<td class="market">{$entry->fields.Market->dropdown_value}</td>
<td class="contact" rowspan="2">
{if $entry->telephone ne ''}Phone: {$entry->telephone}<br />{/if}
{if $entry->contact_email ne ''}<a href="mailto:{$entry->contact_email}">Email</a><br />{/if}
{if $entry->website ne ''} <a href="http://{$entry->website}">Website</a>{/if}
</td>
</tr>
<tr>
<td colspan="3" class="description">
{assign var='tmp' value='ShortDescription'}{if $entry->fields.$tmp->value ne ''}{$entry->fields.$tmp->value}{else if $entry->details ne ''}{$entry->details}{/if}</td>
</tr>
{/foreach}
</table>
{/if}
----------------------------------------------
Cms Version: 1.11.2.1
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.3
FileManager: 1.4.1
MenuManager: 1.8.4
MicroTiny: 1.2.3
ModuleManager: 1.5.5
News: 2.12.9
Search: 1.7.7
ThemeManager: 1.1.7
TemplateExternalizer: 2.0.8
TinyMCE: 2.9.11
CGSimpleSmarty: 1.5.2
CGExtensions: 1.31.1
JQueryTools: 1.1.1
CompanyDirectory: 1.16.1
FrontEndUsers: 1.20
NeoModule: 0.5.0
NeoContentOps: 0.1.0
MysqlDump: 1.2.4
CGSmartImage: 1.9.5
CGCalendar: 1.10.0.1
Config Information:
php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 24000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.2.17
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
memory_limit: 64M
max_execution_time: 600
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 24M
upload_max_filesize: 24M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.0.96
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
----------------------------------------------