Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 21 Dec 2009, 11:14
Ghostsuit's Avatar
Ghostsuit Ghostsuit is offline
 
Join Date: Nov 2001
Nested Loop with templates

Wonder if anyone can help. What I'm trying to do is show a gig listings but add multiple ticket buying options.

I'm stuck though at the nested part and getting it to display in the template. I'm pretty sure the bit that's wrong is the 1st and 3rd line as if I do it with just the second line I get one link displayed but with this code I get none.

I know it's something simple but I'm new to the way vB4 does stuff.

So any ideas?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Here's the full loop with nesting


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Face Your Fears, Live Your Dreams
www.altnation.com
Reply With Quote
  #2  
Old 21 Dec 2009, 15:13
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You just need to register the array:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And now in the template you may use {vb.raw linkrow.ticketlink}
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 21 Dec 2009, 15:52
Ghostsuit's Avatar
Ghostsuit Ghostsuit is offline
 
Join Date: Nov 2001
Where do I need to put that register line?

Also do I need a separate bit template for the {vb.raw linkrow.ticketlink} or can I jsut include it in the main template?
__________________
Face Your Fears, Live Your Dreams
www.altnation.com
Reply With Quote
  #4  
Old 21 Dec 2009, 15:55
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
In place of this one:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then just use the variable {vb.raw linkrow.ticketlink} in the template.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 21 Dec 2009, 16:06
Ghostsuit's Avatar
Ghostsuit Ghostsuit is offline
 
Join Date: Nov 2001
I must be doing something wrong that's giving blank results. .
__________________
Face Your Fears, Live Your Dreams
www.altnation.com
Reply With Quote
  #6  
Old 21 Dec 2009, 16:42
Ghostsuit's Avatar
Ghostsuit Ghostsuit is offline
 
Join Date: Nov 2001
Heres the full page code with the suggested change made.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

main template (only the main display of table)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

templatebit that does the rows


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

third template for the ticket link


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

What seems to be happening is the ticket link is being skipped somehow then then just dropped in at the top of the gig list page.

It doesn't seem to be getting included in the template.
Attached Images
File Type: jpg vbproblem.jpg (40.5 KB, 5 views)
__________________
Face Your Fears, Live Your Dreams
www.altnation.com
Reply With Quote
  #7  
Old 21 Dec 2009, 16:56
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I *think* (I'm not positive) that you need to use a different variable for your template rendering in the second while loop because you are using the same variable as the template above but it isn't 'complete' yet (you hadn't rendered it and thus completed the action). Maybe try this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 21 Dec 2009, 17:00
Ghostsuit's Avatar
Ghostsuit Ghostsuit is offline
 
Join Date: Nov 2001
That sorted them appearing at the top but still leaving me blank results at the ticket column :S.
__________________
Face Your Fears, Live Your Dreams
www.altnation.com
Reply With Quote
  #9  
Old 21 Dec 2009, 17:12
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I guess you're gonna have to do some debugging and see if your query is getting you what you want. So, play with that loop and see what is really being output.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #10  
Old 21 Dec 2009, 17:18
Ghostsuit's Avatar
Ghostsuit Ghostsuit is offline
 
Join Date: Nov 2001
Yup looks like it thanks for the help though, sure you've got me on the right track

--------------- Added 21 Dec 2009 at 18:37 ---------------

Getting there...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

needed added after the second loop closed to bring the variable into the first loop. Now all I need to do is clear the variable after each loop I think so it's not constantly storing the same links. from the previous time.

All sorted with addition of $event_giglistrowticket=''; after $event_giglistrow .= $templater->render();

Hopefully this helps someone else in future.
__________________
Face Your Fears, Live Your Dreams
www.altnation.com

Last edited by Ghostsuit : 21 Dec 2009 at 17:53. Reason: Auto-Merged DoublePost
Reply With Quote
  #11  
Old 21 Dec 2009, 18:32
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Great!
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 09:47.

Layout Options | Width: Wide Color: