0

我在以下位置使用以下代码在管理产品图像选项卡中添加了图像标题字段

admin/themes/default/template/controllers/products/images.tpl

<td id="td_image_id" class="pointer dragHandle center positionImage">
<input type="text"   name="image_caption"   value=image_caption  >  
</td>

我在 ps_image 表中添加了 image_caption 字段

imageLine({$image->id}, "{$image->getExistingImgPath()}", {$image->position}, "{if $image->cover}enabled{else}forbbiden{/if}", assoc," {$image->image_caption}");

使用从表中检索的上述数据。现在我在更新 image_caption 字段时遇到了困难。如何更新该字段?

4

1 回答 1

1

imageLine JS 函数中只有 5 个参数,见下文

function imageLine(id, path, position, cover, shops)

您需要通过以下方式编辑此功能:

function imageLine(id, path, position, cover, shops, image_caption)
{
 line = $("#lineType").html();
 line = line.replace(/image_id/g, id);
 line = line.replace(/image_caption/g, image_caption);
 ....
}

我希望这会对你有所帮助。

于 2013-08-13T16:30:54.557 回答