Jump to content

[SOLVED] CMS Links Menu Interation


Recommended Posts

In blockcms.tpl I'm trying to use smarty interation to create columns of 4 links like so:

></pre>
<ul>
    {foreach from=$cmslinks item=cmslink name=dolinks}
               title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">
              {$cmslink.meta_title|escape:'htmlall':'UTF-8'}

       {if $smarty.foreach.dolinks.iteration is div by 4}   
</ul>
<br><ul>
       {/if}   
     {/foreach}



This works great with one exception and that is if I have deleted or not included a page in the CMS links. So what it is doing is following the id_cms and descending it's way through. So it will have an empty 3 link in position 3 even if there is no page with an id of 3.

Any idea how I can modify so that it doesn't count the id_cms that aren't there?

Wil

Link to comment
Share on other sites

Apparently this wasn't an issue of id_cms but rather the FooterCMS configuration string that wasn't being updated after deletions. Going to Modules > BlockCMS > Configuration and clicking SAVE fixes that. Now that the FooterCMS string is updated the iterated columns are now in columns of 4 as they should be.

Wil

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...