Forum

Thread tagged as: Problem, Configuration

and add categories to your config/apps.php file. UPGRADING

Hi All I am just upgrading a perch installation to the latest version and after copying the new categories folder over one instructions says

and add categories to your config/apps.php file.

I'm not sure what this means. What line/s should I be adding to the apps.php file?

Thank you in anticipation of guidance.

Alan Muscat

Alan Muscat 0 points

  • 7 years ago

It depends how old your installation is. The file you need to update is perch/config/apps.php

Newer versions will look something like:

<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_events',
        'perch_forms'
    );
?>

Older versions will look something like:

<?php
    include(PERCH_PATH.'/core/apps/content/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php');
    include(PERCH_PATH.'/core/apps/categories/runtime.php');
?>

Make sure you have the categories line from the correct example above.

You can find more information at: https://docs.grabaperch.com/docs/installing-perch/installing-apps/

Hi Nick, and thanks for your response. We have the old style. But given that we have just upgraded to the latest version (not using runway) does this mean we should change the code to your first example?

I'm not even sure what the categories are all about, I assume a new feature?

Any how I will add the old line for now and thank you.

Hello Alan,

I think both versions are still fine, the first version is shorter though and makes it easier to update if you add more apps in the future. While you’re updating anyway it might be worth switching to the newer style, just ignore any apps you don’t have (and don’t put a comma after the last one).

Categories allows you to assign a category to any (I think) content, not just blog posts.

Cheers Nick, much appreciated.

Your advice worked by the way. :)