![]() However, I know you want to understand all the details. That is one of the reasons why template engines such as Twig are so popular. I can post the code for the whole template and the controller that feeds it the $course_groups array if you’d like (fair bit of it).Īs you have discovered, jumping between php and templates is a real pain especially when quoting is involved. ![]() So the code is “stopping” at this line but I have no idea why? So this doesn’t work: vertical_group_id ?>.jpg">Īnd the “error” I’m getting is that, when I view the page, I get only the first navigation link (so the foreach has only looped once) and I also don’t get the mega menu at all (so the loop is incomplete - debugging just breaks out when it gets to this line… rather unhelpfully… doesn’t say why just jumps out of the debug process… I’m using xdebug and vim) I did simplify for the post but have expanded the reply to the true values before testing. ![]() You can see from my code in my later post that the values are actually different in reality. If I just use your code but replace this (id ?>) with this (1), it works perfectly. I know I have $course_groups as an array of objects (I have successfully used the $title property of the first object just above this code and I know I do have an $id property available. That aside, the problem is nothing to do with the other code as: The image I am having issues with is displayed on the left of this mega menu. The foreach creates a quite a complex navigation system, including a header bar with 6 links, each of which, when clicked, shows a “mega menu” (in CSS speak).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |