Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 09 Apr 2012, 17:25
wpeloquin wpeloquin is offline
 
Join Date: May 2006
nested dependent vb:each - building headers for sorting

Hello,

I have tried numerous ways, but am beginning to think this not possible (or i'm just stuck looking at it from a single angle), so figured i'd try to get some outside opinions/help.

In my php file, i create an array that looks like the following:

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

In my template, i can successfully display the entire list using

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

However, what i would like to do is separate the items based on the location, something similar to the image that i attached. A rough code might be something like this, but i know that vb:raw cannot be used in a conditional, and i cannot figure out how to work around this.

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

Attached Images
File Type: png nested.png (12.2 KB, 9 views)
Reply With Quote
  #2  
Old 09 Apr 2012, 18:24
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I think that appraoch will work but you might need to create your own array of locaitons and register it too. Maybe try something like this:


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


and then in your template:


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


I'm not sure of there's any way to use the value from the outer vb:each to specify the inner vb:each array. That would make things a little more efficient.

Last edited by kh99; 11 Apr 2012 at 04:47.
Reply With Quote
  #3  
Old 10 Apr 2012, 21:32
wpeloquin wpeloquin is offline
 
Join Date: May 2006
That didn't work (for me, anyways). I think it still sees the objects in the IF statement as <vb:raw> statements...
Reply With Quote
  #4  
Old 11 Apr 2012, 04:46
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I did have one error in the code above, which I just fixed. It said location.location when it should just be location. Also I left out the htmlspecialchars when setting the locations array. But I did test it and it basically seemed to work. What happens when you try?
Reply With Quote
  #5  
Old 13 Apr 2012, 22:07
wpeloquin wpeloquin is offline
 
Join Date: May 2006
I had to play with the <table> tag and it is working now (see below). Much thanks kh99! I was on the right track it seems, just off on the syntax. You saved me many hours of tedious hair pulling


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


Last edited by wpeloquin; 13 Apr 2012 at 22:21.
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:12.

Layout Options | Width: Wide Color: