Download the PHP package micschk/silverstripe-excludechildren without Composer

On this page you can find all versions of the php package micschk/silverstripe-excludechildren. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-excludechildren

Replaced by core functionality in SS3.5+

Thanks to everyone who installed this extension to hide pages from the SiteTree (almost 16.5K composer installs since 2012). Since comparable functionality has ben added to SilverStripe framework (Hierarchy), I'm not updating this module to SS4.

I've tagged a 2.0 release marking incompatibility from SS3.5 upwards (in composer), this should prompt users to migrate to core functionality as described below. I'll leave this repo as-is so please open a ticket if this causes any problems for you and I'll to my best to sort things out.

The 1.1 release should remain be usable on any SS3 version if needed, but I recommend simply uninstalling this module from SS3.5 onward and updating your config as follows instead:

Configuring hidden pages in SS3.5+

$hide_from_cms_tree hides in CMS, not in front-end

Hiding pagetypes in the CMS, in general

Hiding pagetypes in the CMS, only if sub-page of a 'holder' pagetype

$hide_from_hierarchy hides both in CMS & front-end

Hiding page types in both the CMS & Front-end, in general

Hiding page types in both the CMS & Front-end, only if sub-page of a 'holder' pagetype

Managing 'hidden' pages in SS3.5+

Manage hidden pages using a Gridfield (see: silverstripe-gridfieldsitetreebuttons) on the holder page or use a ModelAdmin or similar.

Of course there's also the very inspireding Lumberjack module (but you've probably seen that being plugged already)... (/sarcasm)

Getting 'hidden' pages in front-end

If using , hidden pages will not be included in loops. Instead, they can be queries using something like:

Or, paginated:

Legacy: using excludechildren module (in SS<3.5)

Requirements

Screenshot

Hide SiteTree items from from the sitetree (and, with some extra code/modules, manage them from a GridField):

Installation

Usage

In config.yml (best):

Or in your Page class (php):

Or externally via _config.php:

Then, add a GridField instead to create/edit subpages

(See Gridfieldpages module below for a turnkey solution/example)

Looping over $Children in templates

This module only hides child pages from the CMS sitetree by default. So you can just use $Children as usual in your theme. Child pages will also be available when creating links to pages from the CMS editor.

When excluding pages from the front-end as well (force_exclusion_beyond_cms), you can add an alternative getter to your Holder:

Or, paginated:

Things to check if your pages are not showing up in $Children:

Customising your children

If you need to customise your hidden children by more than just classname you can implement the getExcludedChildren which needs to return a DataList of the children to show in the SiteTree.

Pro tip

Add GridfieldSitetreebuttons to your gridfieldconfig to edit the pages in their regular edit forms:

Or use/subclass the preconfigured GridfieldPages module, which contains both excludechildren, sitetreebuttons, sorting and publication status:


All versions of silverstripe-excludechildren with dependencies

PHP Build Version
Package Version
Requires silverstripe/cms Version >=3.0 <3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package micschk/silverstripe-excludechildren contains the following files

Loading the files please wait ....