npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apostrophe-copy-page-from-elsewhere

v2.0.1

Published

Allows you to copy a page from elsewhere in the page tree, unlike the standard "copy page" feature which copies the current page.

Downloads

5

Readme

CircleCI

apostrophe-copy-page-from-elsewhere

Why

By default, Apostrophe lets you copy a page, but the new page starts out as a peer of that page. Sometimes it is convenient to be able to pick a page to copy that is far away in the page tree, rather than dragging pages later via the reorganize view.

In addition, in some projects, it is helpful to allow users to copy pages they cannot edit. While this is a security concern for some, for others it is a useful feature. This module introduces an optional way to do that as well.

How

# You should have a working Apostrophe project already at this point

npm install apostrophe-copy-page-from-elsewhere

And, in app.js, where you configure your modules:

modules: {
  // Required to enable the feature
  'apostrophe-copy-page-from-elsewhere': {},
  'apostrophe-pages': {
    // Optional
    copyFromElsewhereWithoutEditPermission: true
  }
}

Don't forget: the copyFromElsewhereWithoutEditPermission option must be configured for the apostrophe-pages module, not this module. That's because this module is really just an "improvement" to apostrophe-pages and contributes new capabilities to it.

Using the feature

Once you enable the module, you will see an additional "Copy Page From Elsewhere" option on the Page Settings menu, complementing the existing "Copy Page" option.

Select the option and you will be prompted to choose a page. You can start typing a page title, or click Browse to browse for any page on the site.

Once you have selected a page, click Copy. The page is copied, and you are redirected there. Then, you are invited to edit the page settings. You will want to do this in order to give the page the right title, at a minimum.

Just like with "Copy Page," your new page will be a peer of the page where you clicked "Copy Page From Elsewhere," unless you clicked it on the home page, in which case it will be a child.

Permissions note

When you create a page in this way, all of its content and settings come from the copied page, except for permissions settings. Permissions settings are inherited from the parent.