wafiq
September 13, 2023, 6:04pm
1
I am using ASP.NET for long time. I just Join the world of PHPMaker (just bought PHP Maker 2024), I am facing issue with custom template card the table (name: Product table) is working fine in add/edit/ view/ list, I tried to custom the card with the following code, when I access the list option of the said table I am receiving the following error message, if i removed the code it’s working fine again. seeking your help to resolve this issue:Products
Home
Products
Error
E:\aaa\views\ProductsTableCards.php(83): syntax error, unexpected variable “$rowindex”, expecting “,” or “;”
Following the card custom code
<div class="card h-100" style="background-color: #FFFAFA;">
<div class="row g-0">
<div class="col-sm-6">
{{{product_photo}}}
</div>
<div class="col-sm-6">
<div class="card-body">
<h5 class="card-title">{{{product_name}}}</h5>
<p class="card-text"><small class="text-muted">{{{product_code}}}</small></p>
<p class="card-text">{{{product_categ}}}</p>
<p class="card-text">{{{product_status}}}</p>
</div>
</div>
</div>
{{{list_options_2}}}
</div>
arbei
September 14, 2023, 1:01am
2
wafiq wrote:
E:\aaa\views\ProductsTableCards.php(83): syntax error, unexpected variable “$rowindex”, expecting “,” or “;”
You may post code near line 83 for discussion.
wafiq
September 14, 2023, 1:27pm
3
Thank you for your replay. May i post the full code of the ProductTableCard.phpnear 83 only
<?php
// Render list options (body, bottom)
$Page->ListOptions->Tag = "div";
$Page->ListOptions->render("body", $Page->MultiColumnListOptionsPosition, $Page->RowCount);
?>
</div><!-- /.ew-multi-column-list-option -->
</div>
<?php } ?>
<div class="card-body">
<?php if ($Page->product_name->Visible) { // product_name ?>
<?php if ($Page->RowType == RowType::VIEW) { // View record ?>
<div id="el<?= $Page->RowIndex == '$rowindex$' ? '$rowindex$' : $Page->RowCount ?>_products_table_product_name" class="el_products_table_product_name card-title">
<span<?= $Page->product_name->viewAttributes() ?>>
<?= $Page->product_name->getViewValue() ?></span>
</div>
<?php } else { // Add/edit record ?>
<div class="row products_table_product_name">
<label class="<?= $Page->LeftColumnClass ?>"><?= $Page->product_name->caption() ?></label>
<div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->product_name->cellAttributes() ?>>
<div id="el<?= $Page->RowIndex == '$rowindex$' ? '$rowindex$' : $Page->RowCount ?>_products_table_product_name" class="el_products_table_product_name card-title">
<span<?= $Page->product_name->viewAttributes() ?>>
<?= $Page->product_name->getViewValue() ?></span>
</div>
</div></div>
Hi, I have tested your script within my application and it’s working properly.
I recommend you re-install PHPMAKER and follow PHPMAKER requirements and steps.RegardsRoberto Reis .'.