apostrophe-pages | pages adds page rendering to the Apostrophe content | Data Visualization library

 by   apostrophecms-legacy JavaScript Version: Current License: MIT

kandi X-RAY | apostrophe-pages Summary

kandi X-RAY | apostrophe-pages Summary

apostrophe-pages is a JavaScript library typically used in Telecommunications, Media, Advertising, Marketing, Analytics, Data Visualization, Jekyll applications. apostrophe-pages has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

apostrophe-pages adds page rendering to the Apostrophe content management system. The apostrophe-pages module makes it easy to serve pages, fetching the requested page and making its content areas available to your page templates along with any other attributes of interest.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              apostrophe-pages has a low active ecosystem.
              It has 5 star(s) with 9 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 6 have been closed. On average issues are closed in 0 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of apostrophe-pages is current.

            kandi-Quality Quality

              apostrophe-pages has no bugs reported.

            kandi-Security Security

              apostrophe-pages has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              apostrophe-pages is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              apostrophe-pages releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of apostrophe-pages
            Get all kandi verified functions for this library.

            apostrophe-pages Key Features

            No Key Features are available at this moment for apostrophe-pages.

            apostrophe-pages Examples and Code Snippets

            No Code Snippets are available at this moment for apostrophe-pages.

            Community Discussions

            QUESTION

            Public User Function to change Values
            Asked 2021-Apr-12 at 21:18

            I would like to add a button to allow the public user to save simple true/false boolean values in their session and change things in the template according to those decisions. I think there are quite a few scenarios where something like this applies, like light/dark theme choice, "are you over 18" age queries or GDPR/Privacy stuff, where google analytics scripts need to be loaded only after the users decision.

            For example I when I want to add a theme choice for public users.

            This are my fields in my apostrophe-palette-global:

            ...

            ANSWER

            Answered 2021-Apr-12 at 21:18

            Apostrophe doesn't have a preference for reading/writing a browser storage endpoint, you'll have to roll your own with custom front end scripts that read/write and maintain your state.

            Below are some more detailed notes based on your code samples, you might not need this if you have a pretty good grasp on what to do when the answer to your original question is "no" :)

            1. The way you're handling theme styles via palette seems good, although I would alter your selectors to follow something higher in the DOM, like

            Source https://stackoverflow.com/questions/67025554

            QUESTION

            Add pre-defined widgets to home
            Asked 2021-Apr-08 at 22:23

            I'm following this answer which was really useful for me to have some pre-defined widgets on newly created pages.

            ...

            ANSWER

            Answered 2021-Apr-08 at 22:23

            I think if this was added before the database was ever created then beforeInsert would cover it. Since there wasn't a home page yet, it would be inserted when the app first starts up. But let's assume you already created the app.

            This might be job for a migration. You could write a migration that looks for the home page (slug: '/') and looks to see if that area is empty. If it is, then update the doc with your data. It should only run once since migrations are tracked in a database collection. Even if it does run again, as long as you are querying only "home pages" that don't yet have the data, you'll be safe.

            Source https://stackoverflow.com/questions/66985716

            QUESTION

            Apostrophe CMS: Is it possible to customize the UI on apostrophe-pages?
            Asked 2020-Feb-26 at 16:36

            I need to add a column on the 'Pages' modal in the Apostrophe CMS and potentially override the existing column titles (i.e. "Link" to something a little more intuitive). The closest thing I saw in the online documentation was here: https://docs.apostrophecms.org/apostrophe/reference/modules/apostrophe-pages#contextmenu

            Though, when I paste the example code into my apostrophe-pages/index.js, I don't see any change anywhere in the CMS.

            Hope someone can offer any insight!

            ...

            ANSWER

            Answered 2020-Feb-26 at 16:36

            The contextMenu is the menu revealed by the button in the bottom left. It's named that because it (generally) reflects the context in which it's being used (e.g., "new-page" creates a new page as a child of the page you're on).

            Generally for pieces you would want to look at the "Adding columns" documentation. However pages are special, so have their own "reorganize" view and accompanying JS to control the page tree structure.

            Source https://stackoverflow.com/questions/60401661

            QUESTION

            Is there any method to inject browser JS in apostrophe-pages?
            Asked 2019-Jul-26 at 14:35

            I'm interested into a method like self.play from apostrophe-widgets that permit us apply Jquery selectors without having any doubt that the selector only should be applied to the widget, thanks to $widget parameter.

            What I want to obtain is the same behaviour but with apostrophe-pages, I've research into the documentation and I didn't find anything. Is there any way to replicate the same behaviour?

            I let a reference to the method I'm talking about to clarify the question. https://docs.apostrophecms.org/apostrophe/modules/apostrophe-widgets#more

            Thanks for your help!

            ...

            ANSWER

            Answered 2019-Jul-26 at 14:35

            Currently there is no equivalent player for pages. Typically we push those front-end modules all the time and let them decide when they're relevant or not. Because there is no equivalent, there is no concept of a safe jQuery $widget object or data about the page being passed down.

            That pattern around pushing page-specific modules is illustrated in the Open Museum demo in the apostrophe-assets module.

            https://github.com/apostrophecms/apostrophe-open-museum/tree/master/lib/modules/apostrophe-assets

            A widget's player method is really nice because it knows to re-run itself when Apostrophe does various editing/saving operations. You can get similar re-running behavior anywhere by listening for the front-end apos event ready. A bit of documentation on that here https://docs.apostrophecms.org/apostrophe/tutorials/howtos/migration#browser-side-javascript-is-pretty-close-to-the-same

            Source https://stackoverflow.com/questions/57217976

            QUESTION

            How to access widget properties/parameters inside a widget template in Apostrophe cms
            Asked 2019-May-28 at 12:41

            I was playing with Apostrophe CMS, and tried to create a widget which gets some values from a third party API based on its settings. Is there any way I could retrieve the values of the widget inside the widget index.js? Basically when the admin creates a page, he will add a widget with some values set. And the widget behavior should change based on those settings. Is this possible at all and if it is then how?

            ...

            ANSWER

            Answered 2019-May-16 at 17:47

            If you want to do something to a widget before it renders on a page you can hook into the widget's load method in it's index.js

            Source https://stackoverflow.com/questions/56167528

            QUESTION

            Why is the apostrophe-pages _children array is always empty?
            Asked 2019-Mar-28 at 21:29

            I am trying to get the children of apostrophe pages to appear in my navigation object - however the _children array is always empty. My page does have child pages set up via the front end Pages UI.

            My index.js for the lib/modules/apostrophe-pages module contains the following:

            ...

            ANSWER

            Answered 2019-Mar-28 at 21:29

            Solved it..

            I needed to add 'rank: 1, path: 1, level: 1' to the projection as per this page in the documentation: https://apostrophecms.org/docs/tutorials/howtos/children-and-joins.html#projections-and-children

            Source https://stackoverflow.com/questions/55401302

            QUESTION

            Template overriding in custom npm-modules in Apostrophe CMS
            Asked 2019-Jan-15 at 14:40

            In order to have a common setup in most of my Apostrophe projects, I plan on building some custom npm-modules to bundle them and add them to my projects. Some of the features I would like to do in them, appart from adding widgets and backend functionality, is editing official apostrophe modules' setup (e.g., setting up default page types for apostrophe-pages) and overriding nunjuck blocks and/or templates.

            Both things can easily be overwritten on a project-level configuration with Apostrophe's implicit subclassing mechanism, so my goal of sharing a common base setup for different projects could be achieved with a custom boilerplate, although I would lose the ability of upgrading my defaults by releasing new versions of my node modules.

            All in all, I was thinking in a Maven-style dependency hierarchy like this:

            Apostrophe npm modules <- custom npm modules <- project modules

            Coming form a Java and Maven based CMS, I understand I will need to change my way of thinking in many things, so: is what I'm trying to do possible and does it make sense in the Apostrophe world? What would be "The Apostrophe Way" to achieve something like this? Do I need to create a custom npm module to with the moog option improve for each module I want to extend?

            Thanks in advance.

            ...

            ANSWER

            Answered 2019-Jan-15 at 14:40

            Even in the npm_modules directory, apostrophe will scaffold out base modules first and modules that extend those modules second, meaning your custom npm modules will follow the same inheritance chain as the official apostrophe modules. You can override them the same way you would any other apostrophe module.

            meta module (apostrophe-pieces) > custom-pieces (piece extension, custom npm module) > custom-pieces (project-level overrides)

            You would just selectively override files and methods in lib/modules/ the same way you'd override parts of apostrophe-blog, like lib/modules/custom-pieces/views/widget.html

            Am I correctly understanding the way you want to override things?

            Source https://stackoverflow.com/questions/54181242

            QUESTION

            Custom Page Template
            Asked 2018-Dec-15 at 19:35

            I'm attempting to add a custom page, that will not be associated with a particular type of piece or other set of data. It will be used to run actions for reporting and processing/showing data, so it needs to be fairly stand-alone. I want it to be a page type, so it will be handled in navigation the same way that any other page is. I mostly have it working, but am running into an issue - no matter how I set it up, when I try to navigate to an instance of the page that gets created, it always looks for the template in lib/modules/apostrophe-pages/views/pages instead of the module folder.

            In this case, I'm currently calling the module test-item (will rename once I figure out what the issue is). So, I have a folder called lib/modules/test-item, with index.js and views/index.html. I also attempted to rename the template in the views folder to show.html and test-item.html just to be sure it wasn't a naming issue. Here's how the module is configured in index.js:

            ...

            ANSWER

            Answered 2018-Dec-15 at 19:35

            apostrophe-custom-pages templates still live in the project level lib/modules/apostrophe-pages/views/pages/MODULE-NAME.html.

            If you're trying to fully modularize a custom page as an npm module you can make an improve based module which can add a view to the apostrophe-pages module.

            Source https://stackoverflow.com/questions/53791505

            QUESTION

            Unmanaged Module Error in Console
            Asked 2018-Aug-24 at 17:00

            This error came out on my console when I configured pieces in same database name using apos.singleton , but I managed to delete directly from DB itself using $unset method :

            ...

            ANSWER

            Answered 2018-Aug-24 at 12:59

            I am not sure why you are using $unset to unset the someDate property, which is not related to this issue.

            The issue is that you still have docs in your aposDocs collection which have the type property set to portfolios, tryComment, or trycomment.

            Assuming you really want them gone, you can remove them this way (mongo shell example):

            db.aposDocs.remove({ type: { $in: [ 'portfolios, 'tryComment', 'trycomment' ] } });

            $unset has nothing to do with removing documents. It unsets particular properties of documents that remain in the database.

            Source https://stackoverflow.com/questions/51981177

            QUESTION

            Access template options in module's construct method
            Asked 2018-Aug-03 at 11:45

            In Apostrophe, I have a custom module where I would like to pass an option from the Nunjucks apos.area call to the construct method of the widget itself. Concretely, I want to adjust the output of getWidgetWrapperClasses based on the options passed to the module in the template. Is this possible?

            Here's an example of what I would like to achieve:

            lib/modules/example-widgets/index.js

            ...

            ANSWER

            Answered 2018-Aug-03 at 11:45

            I solved this by not using the getWidgetWrapperClasses method, but instead extending the widget wrapper template and overriding a Nunjucks block in there. This is in fact a documented approach if you look in lib/modules/apostrophe-areas/views/widgetBase.html in Apostrophe's code.

            I changed lib/modules/example-widgets/index.js like this:

            Source https://stackoverflow.com/questions/51671543

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install apostrophe-pages

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/apostrophecms-legacy/apostrophe-pages.git

          • CLI

            gh repo clone apostrophecms-legacy/apostrophe-pages

          • sshUrl

            git@github.com:apostrophecms-legacy/apostrophe-pages.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link