X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Assign multiple arrays in var (https://forum.x-cart.com/showthread.php?t=46554)

nck-k 03-25-2009 11:58 PM

Assign multiple arrays in var
 
Hi,

I am trying to assing multiple arrays to 1 var:

Code:

{assign var=curpath value=$c.categoryid|$ct.parentid|$cat}

Complete code:
Code:

{foreach from=$categories item=ct key=catid}
{assign var=catpath value=$ct.categoryid_path}
{assign var=curpath value=$c.categoryid/$ct.parentid/$cat}
  <a href="home.php?cat={$ct.categoryid}" title=" en {$catpath} und {$curpath}">{$ct.category}</a>
   
    {if ($ct.expanded || $config.Fancy_Categories.fancy_js eq "Y") && $ct.subcategory_count > 0}
      <ol>
        <li>{include file="`$fc_skin_path`/fancy_subcategories_sub.tpl" parent=$ct categories=$ct.childs}</li>
      </ol>
    {/if}
{/foreach}


i get c.categoryid from another loop, this loop is a part of it.

I want to get a var like: 30/5/2 beacause i need to compare this var with the categoryid_path

This all for the solution of this post:
http://forum.x-cart.com/showthread.php?t=46407

Victor D 03-26-2009 04:23 AM

Re: Assign multiple arrays in var
 
Hmmm...
Code:

{capture name=weirdURL}$c.categoryid|$ct.parentid|$cat{/capture}
{if $smarty.capture.weirdURL eq $ categoryid_path}
bla-bla-bla
{/if}

Smarty are not so smart while handling arrays. It's sad but true :(


All times are GMT -8. The time now is 11:59 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.