"0"); ?>Order: titleFRONT LISTSettings:Display Type: CustomFilters: Entries.typePage limit: 10Permissions: index/view: Public - allowedfor displaying entries I have entered inFRONT LIST - List Display - Custom Header code:Footer code:Body Code: {title} {entry}my locale en_gb contains: ENTRIES=Entriesthis is what the debugger shows:Array ( [0] => SELECT `Extension`.`id` AS `Extension.id`, `Extension`.`name` AS `Extension.name` FROM `fi089_chronoengine_extensions` AS `Extension` WHERE `Extension`.`enabled` = '1' ORDER BY `Extension`.`ordering` ASC [1] => SELECT `Connection`.`id` AS `Connection.id`, `Connection`.`title` AS `Connection.title`, `Connection`.`params` AS `Connection.params`, `Connection`.`extras` AS `Connection.extras`, `Connection`.`published` AS `Connection.published` FROM `fi089_chronoengine_connections` AS `Connection` WHERE `Connection`.`title` = 'ViewEntries' AND `Connection`.`published` = '1' [2] => SELECT COUNT(`Entries`.`id`) AS `Entries.count` FROM `fi089_cf_entries` AS `Entries` WHERE `Entries`.`id` > '0' [3] => SELECT `Entries`.`id` AS `Entries.id`, `Entries`.`uniq_id` AS `Entries.uniq_id`, `Entries`.`user_id` AS `Entries.user_id`, `Entries`.`created` AS `Entries.created`, `Entries`.`modified` AS `Entries.modified`, `Entries`.`title` AS `Entries.title`, `Entries`.`type` AS `Entries.type`, `Entries`.`entry` AS `Entries.entry` FROM `fi089_cf_entries` AS `Entries` WHERE `Entries`.`id` > '0' ORDER BY `Entries`.`title` LIMIT 10)upon viewing the connection what I see is this:ENTRIES{title}{entry} could u pls advice about the appropriate syntax ?"> first CC attempt - Forums

Forums

first CC attempt

chrissy6930 05 Mar, 2015
hi all,

I have set up 2 forms with CF5 to add/edit entries
what I would like to do now is display the entries in a fashion similar to news blog layout - and add a filter
as far as I can see I will need CC for that

my table only holds 3 fields apart from the default CF fields: title, type, entries

in my connection I have
MODEL
Model Title: Entries
Table Name: #__cf_entries
Conditions: <?php return array("id >" => "0"); ?>
Order: title
FRONT LIST
Settings:
Display Type: Custom
Filters: Entries.type
Page limit: 10
Permissions: index/view: Public - allowed

for displaying entries I have entered in
FRONT LIST - List Display - Custom
Header code:
<div class="componentheading"><?php echo JText::_('ENTRIES'); ?></div>
<table>

Footer code:
</table>

Body Code:
<tbody>
<tr>
  <td class="contentheading" width="100%">{title}</td>
</tr>
<tr>
  <td valign="top">{entry}</td>
</tr>
</tbody>


my locale
en_gb contains: ENTRIES=Entries

this is what the debugger shows:
Array (
    [0] => SELECT `Extension`.`id` AS `Extension.id`, `Extension`.`name` AS `Extension.name` FROM `fi089_chronoengine_extensions` AS `Extension` WHERE `Extension`.`enabled` = '1' ORDER BY `Extension`.`ordering` ASC
    [1] => SELECT `Connection`.`id` AS `Connection.id`, `Connection`.`title` AS `Connection.title`, `Connection`.`params` AS `Connection.params`, `Connection`.`extras` AS `Connection.extras`, `Connection`.`published` AS `Connection.published` FROM `fi089_chronoengine_connections` AS `Connection` WHERE `Connection`.`title` = 'ViewEntries' AND `Connection`.`published` = '1'
    [2] => SELECT COUNT(`Entries`.`id`) AS `Entries.count` FROM `fi089_cf_entries` AS `Entries` WHERE `Entries`.`id` > '0'
    [3] => SELECT `Entries`.`id` AS `Entries.id`, `Entries`.`uniq_id` AS `Entries.uniq_id`, `Entries`.`user_id` AS `Entries.user_id`, `Entries`.`created` AS `Entries.created`, `Entries`.`modified` AS `Entries.modified`, `Entries`.`title` AS `Entries.title`, `Entries`.`type` AS `Entries.type`, `Entries`.`entry` AS `Entries.entry` FROM `fi089_cf_entries` AS `Entries` WHERE `Entries`.`id` > '0' ORDER BY `Entries`.`title` LIMIT 10
)


upon viewing the connection what I see is this:
ENTRIES
{title}
{entry}


could u pls advice about the appropriate syntax ?
GreyHead 06 Mar, 2015
Hi chrissy6930,

Please try {Entries.title} - in CC you need to include the Model ID/name as you may be using reults from more than one table.

Bob
chrissy6930 06 Mar, 2015
tyty Bob! that works 🙂

now I would like to add 2 more details:

1) pagination
I tried adding after </table> in the footer:
<?php $this->view->Paginator->getNav(); ?> or
_PAGINATOR_NAV_
but none of them would work

2) adding a select list as a filter
the filter should be for field type, with the following options:
<select name="type" id="type" size="" class="form-control A" title="" >
<option value="0"><?php echo JText::_('OPTION1'); ?></option>
<option value="1"><?php echo JText::_('OPTION2'); ?></option>
<option value="2"><?php echo JText::_('OPTION3'); ?></option>
</select>

could u pls help me out some more pls?

best regards
Gabriela
This topic is locked and no more replies can be posted.