Include Cs-Cart tpl File into Custom tpl


I'm using Cs-Cart v3. I created bottom.tpl file and included it into index.tpl file.

{hook name="index:footer"}
{include file="bottom.tpl"}

And in bottom.tpl file i included categories_text_links_tpl.

There is a line in bottom.tpl:

{include file="blocks/categories/categories_text_links.tpl"}

content of the categories_text_links.tpl file:


{** block-description:text_links **}

{if $items}

{/if} ```

bottom.tpl has some html content and contains:
```php {include file="addons/news_and_emails/blocks/static_templates/subscribe.tpl"} ```

They are working well. But it doesn't list categories as text link. If i create a block it's working well, showing categories as text link.

I copied basic theme and customizing it. What am i missing? Why doesn't it list the categories as text link in a custom tpl file?

Blocks has a PHP fillings, so categories_text_links.tpl has it's $items, rather then your included tpl.

Try to write

{assign var="items" value=""|fn_get_categories}
{include file="blocks/categories/categories_text_links.tpl" items=$items}

in your bottom.tpl file.


PS. This topic should be in the developer's corner

Thank you for your answer. I'm sorry to open this topic in General Questions.

I added code you said and it gave an error:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/sachane/public_html/v3/core/fn.catalog.php on line 1143

It's fn_get_categories function. What should i do? I'm using Cs-Cart 3.

I found the line and make the second argument array by writing (array) in front of it. But still no luck. I cannot get categories.