[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ic] table-organise question/gripe


Peter [pajamian.dhs.org] said:
> I'd like to be able to use table-organise with the rows attribute but
> without the table attribute, unfortunately the code for table-organise
> explicitly does not allow this and has a line added in to prevent it.
> Any particular reason why this is the case?
>
> Here's an example of what I'd like to do to get one table with all my
> thumbnails for my products lined up nice and neat with the data also
> lined up...
>
[snip stuff]

Peter,

I may not be able to address your specific issues, like the data lining up
part, but I have attached a few examples of table usage you can take a look
at. The search_results page addresses issues when you have more than one
category, like when you perform a text search for products.
It is not a perfect solution, but it works OK.

Maybe it will help you, or maybe someone else.
I got most of this from the mailing list archives and tweaked to suit.

Good luck!

Curt Hauge
Office 763-689-4984
Cell   612-598-5530
www.IWantAConsultant.com
www.MNWebDesign.com
[comment] ui_template: Yes ui_template_name: leftright [/comment] [set bgcolor]#FFFFFF[/set] [set component_right]promo_vertical[/set] [set component_after]cross_horizontal[/set] [set members_only]0[/set] [set component_vsize]4[/set] [set page_banner] [/set] [set vbanner]Specials[/set] [set component_hsize]3[/set] [set hbanner]Also see...[/set] [set component_before][/set] [set hpromo_type]specials[/set] [set page_title]__COMPANY__ -- Search results[/set] [set vpromo_type]specials[/set] @_LEFTRIGHT_TOP_@ [if scratch did_order] [include file="templates/components/cart_display"] [elsif items]
Item Total: [subtotal]Check Out
Approx. S&H: [shipping]
Approx. Total Cost: [total-cost]
[/elsif] [/if] [set did_order][/set] [search-region] [set munge_quantity] [calc] $Scratch->{did_order} = 1; @q = split /\0/, $CGI->{mv_order_quantity}; for (@q) { next unless length $_; $_ = "=$_"; } @parms = grep /^mv_oi\d+/ && $CGI->{$_}, keys %{$CGI}; # If we have parms, means an individual buy. If we don't # we want to strip empty items unless (@parms) { @i = split "\0", $CGI->{mv_order_item}; for(my $i = 0; $i < @i; $i++) { next if length($q[$i]); $i[$i] = ''; } @i = grep length($_), @i; @q = grep length($_), @q; $CGI_array->{mv_order_quantity} = suppressed; $CGI->{mv_order_quantity} = join "\0", @q; $CGI_array->{mv_order_item} = suppressed; $CGI->{mv_order_item} = join "\0", @i; return; } my $item = $parms[0]; $item =~ /(\d+)/ or return; my $idx = $1; $idx--; $CGI->{mv_order_item} = $CGI->{$item}; $CGI->{mv_order_quantity} = "$q[$idx]"; return; [/calc] [bounce href=""] [/set] [tmp cross_sale][value-extended name=mv_searchspec index=0][/tmp] [on-match] [/on-match] [search-list] [item-change 1][condition][item-field category][/condition] [/item-change 1] [item-alternate 4][else][/else][/item-alternate] [/search-list]
[either][value banner_text][or][item-field category][/either]
[if-data products featured][data table="merchandising" column="blurb_begin" key="[item-code]"][/if-data] [if file __DOCROOT____IMAGE_DIR__/thumb/[item-code]_b.jpg][item-description] - Click to enlarge this image[else]No
Image
Available
[/else][/if]
[item-price]
[item-description]
[if-item-field comment]Tell me more!
[/if-item-field]

[item-code]
  
[on-match] [/on-match] [no-match]

Sorry, no matches for [calc] my $joiner = ' AND '; $joiner = ' OR ' if defined $Search->{''}->{mv_orsearch}[0] and $Search->{''}->{mv_orsearch}[0]; my @str = grep /\D/, @{$Values->{mv_searchspec}}; return join $joiner, @str; [/calc] [if value mv_search_error]

Errors:
[value-extended name=mv_search_error joiner="
"]
[/if]


[/no-match]
[more-list]
Matches [matches] of [match-count] found.
[more]
[/more-list] [/search-region] @_LEFTRIGHT_BOTTOM_@ [comment] ui_template: Yes ui_template_name: leftright [/comment] [set bgcolor]#FFFFFF[/set] [set component_right]promo_vertical[/set] [set component_after]cross_horizontal[/set] [set members_only]0[/set] [set component_vsize]6[/set] [set page_banner] [/set] [set vbanner]Specials[/set] [set component_hsize]3[/set] [set hbanner]Also see...[/set] [set component_before][/set] [set hpromo_type]specials[/set] [set page_title]__COMPANY__ -- Search results[/set] [set vpromo_type]specials[/set] @_LEFTRIGHT_TOP_@ [log hide=1 file="logs/search.txt" interpolate=1][value-extended name="mv_searchspec" joiner="|"][/log] [if scratch did_order] [include file="templates/components/cart_display"] [/if] [set did_order][/set] [search-region] [set munge_quantity] [calc] $Scratch->{did_order} = 1; @q = split /\0/, $CGI->{mv_order_quantity}; for (@q) { next unless length $_; $_ = "=$_"; } @parms = grep /^mv_oi\d+/ && $CGI->{$_}, keys %{$CGI}; # If we have parms, means an individual buy. If we don't # we want to strip empty items unless (@parms) { @i = split "\0", $CGI->{mv_order_item}; for(my $i = 0; $i < @i; $i++) { next if length($q[$i]); $i[$i] = ''; } @i = grep length($_), @i; @q = grep length($_), @q; $CGI_array->{mv_order_quantity} = suppressed; $CGI->{mv_order_quantity} = join "\0", @q; $CGI_array->{mv_order_item} = suppressed; $CGI->{mv_order_item} = join "\0", @i; return; } my $item = $parms[0]; $item =~ /(\d+)/ or return; my $idx = $1; $idx--; $CGI->{mv_order_item} = $CGI->{$item}; $CGI->{mv_order_quantity} = "$q[$idx]"; return; [/calc] [bounce href=""] [/set] [tmp cross_sale][value-extended name=mv_searchspec index=0][/tmp] [on-match] [/on-match] [search-list] [item-change 1][condition][item-field category][/condition] [perl no_return=1]$tmp_increment=0[/perl] [/item-change 1] [perl no_return=1]++$tmp_increment[/perl] [if explicit] [condition] return 1 if $tmp_increment % 4 == 0; return 0; [/condition] [else] [/else] [/if] [/search-list]
[either][value banner_text][or][item-field category][/either]
[if-data products featured][data table="merchandising" column="blurb_begin" key="[item-code]"][/if-data] [if file __DOCROOT____IMAGE_DIR__/thumb/[item-code]_b.jpg][item-description] - Click to enlarge this image[else]No
Image
Available
[/else][/if]
[item-price]
[item-description]
[if-item-field comment]Tell me more!
[/if-item-field]

[item-code]
  
[on-match] [/on-match] [no-match]

Sorry, no matches for [calc] my $joiner = ' AND '; $joiner = ' OR ' if defined $Search->{''}->{mv_orsearch}[0] and $Search->{''}->{mv_orsearch}[0]; my @str = grep /\D/, @{$Values->{mv_searchspec}}; return join $joiner, @str; [/calc] [if value mv_search_error]

Errors:
[value-extended name=mv_search_error joiner="
"]
[/if]


[/no-match]
[more-list]
Matches [matches] of [match-count] found.
[more]
[/more-list] [/search-region] @_LEFTRIGHT_BOTTOM_@
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.