Dynamic Values on Layouts #93

Closed
opened 2017-06-01 02:16:16 +00:00 by mwweb · 2 comments
mwweb commented 2017-06-01 02:16:16 +00:00 (Migrated from github.com)

I noticed, today, when working on finishing a couple of views that there is a "reference" issue on layouts when it's displaying the dynamic values. You can see this on, as an example "Preachers Panel". The main get shows the foreach correctly: , using $displayData instead of $this->item.

However, on the additional get, idPreacherSermonB, it references $item, instead of $displayData: idPreacherSermonB as $idPreacherSermonB): ?>. As written, it would throw errors. However, if it was idPreacherSermonB as $idPreacherSermonB): ?>, it would work fine.

If someone is relying, copying from those references, they may get frustrated when idPreacherSermonB is throwing errors.

I noticed, today, when working on finishing a couple of views that there is a "reference" issue on layouts when it's displaying the dynamic values. You can see this on, as an example "Preachers Panel". The main get shows the foreach correctly: <?php foreach ($displayData as $item): ?>, using $displayData instead of $this->item. However, on the additional get, idPreacherSermonB, it references $item, instead of $displayData: <?php foreach ($item->idPreacherSermonB as $idPreacherSermonB): ?>. As written, it would throw errors. However, if it was <?php foreach ($displayData->idPreacherSermonB as $idPreacherSermonB): ?>, it would work fine. If someone is relying, copying from those references, they may get frustrated when idPreacherSermonB is throwing errors.
ro-ot commented 2017-06-01 07:17:35 +00:00 (Migrated from github.com)

Yes those code snippets do need some attention, would you like to make improvement to it?

Yes those code snippets do need some attention, would you like to make improvement to it?

Okay this could be an issue if you don't know PHP, but this is clearly a requirement :)

Would be great to improve this, the algorithm is very crazy... you can have a look at it here. It is just that the variation is huge, and to correctly set those values across various places is where the improvements are needed.

Okay this could be an issue if you don't know PHP, but this is clearly a requirement :) Would be great to improve this, the algorithm is very crazy... you can have a [look at it here](https://github.com/vdm-io/Joomla-Component-Builder/blob/master/admin/models/ajax.php#L322). It is just that the variation is huge, and to correctly set those values across various places is where the improvements are needed.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#93
No description provided.