Jump to content

[SOLVED] CMS page in blockcategories


puspo

Recommended Posts

Hi everyone,

 

i think it's simple, but I haven't find any solution. 

 

My top menu includes 1 category and 2 cms pages. But my blockcategories doesn't display this two cms pages.

I trying to change some tpl files like blockcategories.tpl and category-tree-branch.tpl but without correct solution. 

 

Does anyone have a solution??

Thanks for every replies.

Link to comment
Share on other sites

its not possible to attach links to CMS pages inside block categories module.

you can do it manually with modification of blockcategories.tpl file located in module directory.

make sure that you modified correct file (for example, maybe module files are overrided by your template - just check your theme folder for module files.)

Link to comment
Share on other sites

its not possible to attach links to CMS pages inside block categories module.

you can do it manually with modification of blockcategories.tpl file located in module directory.

make sure that you modified correct file (for example, maybe module files are overrided by your template - just check your theme folder for module files.)

 

First of all, thank you for reply. 

 

Yes, I know little about blockcategories.tpl, but I can't imagine, where I put a CMS code and what code ..

<!-- Block categories module -->
<div id="categories_block_left" class="block">
    <!--<p class="title_block">{l s='Categories' mod='blockcategories'}</p>-->
    <div class="block_content">
        <ul class="tree {if $isDhtml}dhtml{/if}">
        {foreach from=$blockCategTree.children item=child name=blockCategTree}
            {if $smarty.foreach.blockCategTree.last}
                {include file="$branche_tpl_path" node=$child last='true'}
            {else}
                {include file="$branche_tpl_path" node=$child}
            {/if}
        {/foreach}
        </ul>
        {* Javascript moved here to fix bug #PSCFI-151 *}
        <script type="text/javascript">
        // <![CDATA[
            // we hide the tree only if JavaScript is activated
            $('div#categories_block_left ul.dhtml').hide();
        // ]]>
        </script>
    </div>
</div>
<!-- /Block categories module -->

Please, can You tell me what and where i must put? 

Thanks.

Link to comment
Share on other sites

<ul class="tree {if $isDhtml}dhtml{/if}">

HERE
{foreach from=$blockCategTree.children item=child name=blockCategTree}
{if $smarty.foreach.blockCategTree.last}
{include file="$branche_tpl_path" node=$child last='true'}
{else}
{include file="$branche_tpl_path" node=$child}
{/if}
{/foreach}

OR HERE
</ul>

 

what code? for example:

<a href="{$link->getPageLink('new-products')|escape:'html'}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a>
  • Like 1
Link to comment
Share on other sites

 

<ul class="tree {if $isDhtml}dhtml{/if}">

HERE

{foreach from=$blockCategTree.children item=child name=blockCategTree}

{if $smarty.foreach.blockCategTree.last}

{include file="$branche_tpl_path" node=$child last='true'}

{else}

{include file="$branche_tpl_path" node=$child}

{/if}

{/foreach}

OR HERE

</ul>

 

what code? for example:

<a href="{$link->getPageLink('new-products')|escape:'html'}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a>

 

Hi,

 

I'm confused..

if i try

<a href="{$link->getPageLink('new-products')|escape:'html'}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a>

I get link to http://www.rozvojsportovnichklubu.cz/eshop/index.php?controller=new-products

but to CMS is http://www.rozvojsportovnichklubu.cz/eshop/index.php?id_cms=6&controller=cms

 

so, in $link->getPageLink('new-products') i missing id_cms=6&

 

 

I also try this

<a href="{$link->getCMSLink(’6′)}" title="how it works">How it works</a>

and i get white screen and don't know why :( I think this is better way to link CMS didn't it?

Link to comment
Share on other sites

add this code:

<li><a href="{$link->getCMSLink('6')}" title="how it works">How it works</a></li>

 

instead of:

<a href="{$link->getCMSLink(’6′)}" title="how it works">How it works</a>

 

 

the problem is with:

getCMSLink(6)

  • Like 1
Link to comment
Share on other sites

add this code:

<li><a href="{$link->getCMSLink('6')}" title="how it works">How it works</a></li>

 

instead of:

<a href="{$link->getCMSLink(’6′)}" title="how it works">How it works</a>

 

 

the problem is with:

getCMSLink(6)

 

Oh my.. It's copy from another website.. Thank you so much! It WORKS! 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...