Jump to content

Exceptions not working with cms pages


Recommended Posts

Hi,
I need to resolve this problem.

If I go into admin and select a block - for example - the Info block - and in the exceptions field I type in 'cms.php.
This will not allow the Info block to appear when a cms page is called.
That's fine.....

But what if I have a specific cms page - example : friendly url - 8-history - and a I don't want the Info block to appear on that page?
But I do want it to appear on other cms pages.

Question:
what can I put in the exceptions field in the Info block to stop the Info block appearing when the cms page called 8-history is called?

Hope that makes sense guys?

ChurchPath.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Topic moved

I don't think that is possible with the exceptions feature. I think the only solution is to edit the TPL files of the blocks and add the following to the top:

{if $page_name == 'cms' AND $smarty.get.id_cms != 1}



and the following to the bottom:

{/if}



This will hide the block on CMS page 1 only.

Link to comment
Share on other sites

First of all sorry for my English, you can get filter by independent cms pages if we make a brief change in /classes/module.php, where it says (line 413)
foreach ($exceptions as $exception)


  if ($fileindex == $exception['file_name'])


    $Show = false;


replaces it
foreach ($exceptions as $exception)


{


  if ($fileindex == $exception['file_name'])


    $Show = false;


  if ($fileindex == 'cms.php' And $show)


  {


    if ($fileindex .'?'.$_SERVER ['QUERY_STRING'] == $exception['file_name'])


      $Show = false;


  }


}

and the exceptions we as a file name cms.php?id_cms=8

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

First of all sorry for my English, you can get filter by independent cms pages if we make a brief change in /classes/module.php, where it says (line 413)

foreach ($exceptions as $exception)

 

if ($fileindex == $exception['file_name'])

 

$Show = false;

 

replaces it

foreach ($exceptions as $exception)

 

{

 

if ($fileindex == $exception['file_name'])

 

$Show = false;

 

if ($fileindex == 'cms.php' And $show)

 

{

 

if ($fileindex .'?'.$_SERVER ['QUERY_STRING'] == $exception['file_name'])

 

$Show = false;

 

}

 

}

 

and the exceptions we as a file name cms.php?id_cms=8

 

 

I want the same thing done for categories... could you please explain it briefly

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