![]() |
Damn, that was simple. I see where I went wrong.
I never put this in the code at all. PHP Code:
--------------- Added [DATE]1333786475[/DATE] at [TIME]1333786475[/TIME] --------------- I read the article, I guess I just wasn't pay attention to it. I really do appreciate it. I've sent you a link to see what I'm trying to accomplish over-all. Just by seeing how it's done, I learned alot faster on how to accomplish this. Now I'm just trying to figure out the foreach statement. I figured I could use the vb:each statement in the template, but that didn't work. |
I'm going to focus on your second problem now:
PHP Code:
PHP Code:
I've replace your unnecessary variables with an array and, furthermore, I've made sure each row gets it own place in the array. PHP Code:
Now replace all that ugliness in your first template render with: PHP Code:
I'd recommend using {vb:each [, ]} to loop through that array and do that. Read my article, it should help you get the basics down: https://vborg.vbsupport.ru/showthread.php?t=280880 |
Appreciate it so much. Just some free time during this deployment. I will read this article one more.
--------------- Added [DATE]1333821880[/DATE] at [TIME]1333821880[/TIME] --------------- I've been trying for hours. I've search on google, and read through your article. I'm assuming that I am making a mistake as to where I'm suppose to put the php code foreach. |
Yo, I am seriously lost.
This is my code in the template PHP Code:
PHP Code:
|
What are you doing? The code I gave you is what you should be using! What you're doing won't work. vb:each replicates the foreach function, so you shouldn't be using an actual foreach in your php code!
HTML Code:
<vb:each from="musicals" key="key" value="musical"> |
Okay, so I put the php code just like you shown, and I've put the vb:each in just like you just posted. Nothing shows.
I've been reading alot of articles. |
Post your complete PHP code and template code.
|
Php Code
PHP Code:
PHP Code:
|
Is the HTML you're showing me from template: vbmusic_latest, or from template: vbmusic
If it's from template: vbmusic, then you need to add: $templater->register('musicals', $musicals); to the register in that template. |
Well god damn, I knew it was something simple that I was over looking. That was it.
I see that your site is music related as well. I'm currently deployed to Afghanistan right now. If it's not to much, can I continue to ask you for help from time to time. I get about six hours of free time each day. If possible how may I contact you. |
All times are GMT. The time now is 11:45 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|