Questions tagged [apostrophe-cms]

The official tag for ApostropheCMS. You can post code-related how-to questions about using Apostrophe, so that other community members can easily find answers to their problems. Please do not ask non-code related questions. Discussions, best practices, and ideas for development should be posted on the forum.

ApostropheCMS is an open source, highly modular content management system on top of Node.js, MongoDB and Nunjucks. It supports in-context editing, schema-driven content types, flexible widgets, and much more.

Start by reading the documentation. There are helpful getting started guides. Want to dive deeper? Understand Apostrophe deeply by consulting the technical overview.

Join the community on the forum. New release notes will be announced there.

Found a bug or want to contribute? File an issue or a pull request on GitHub. Feel free to also contribute to the official modules.

Got stuck? Now post your question. We're happy to help.

529 questions
2
votes
2 answers

Apostrophe Widget Helpers

I have to pass some extra data down to a widget to determine certain ownership/accessibility options of some of my users. I was following the instructions here in order to set up a helper to pass the…
Joseph
  • 865
  • 5
  • 20
2
votes
1 answer

Can I add select/option data type to field type in apostrophe cm widget?

I have a column widget that I'm trying to create a prepopulated dropdown list that a user can choose from that will correspond to a value of bootstrap class names "col-md-6" etc. addFields: [ { type: 'select', name: 'column1width', …
Brad Wood
  • 93
  • 5
2
votes
1 answer

ApostropheJS get index of loop

I am creating a blog on apostrophe JS and I want the first blog post in the index to have a longer preview than the rest of the blogs in the index. Is there a way to get the index of the loop? Or a different way to do this? {%- for piece in pieces…
2
votes
1 answer

How to define area widgets from a macro in Apostrophe CMS

I want to define the widgets for all of my columns and layouts in one place. This code would be in views/macros/columnWidgets.html {% macro columnWidgets(data, option) %} {{ apos.area(data.widget, '{{option}}', { blockLevelControls: true, widgets:…
Brad Wood
  • 93
  • 5
2
votes
2 answers

How to setup nodemon with Apostrophe CMS 2?

Trying to make development with Apostrophe smoother. Running nodemon with app.js and although nodemon detects changes it does not restart the server and i get [nodemon] changes after filters (before/after): 1/0 from Nodemon. I understand that…
Kiril Okun
  • 41
  • 4
2
votes
1 answer

A way to override standard html output by apos.schemas.field()

Does anyone know how to override/extend the behavior of apos.schemas.field() to have it output custom HTML? I've tried to implement a contact form doing it 'their way', however I am quite disappointed at what level of control Apostrophe CMS gives…
VadimG
  • 509
  • 4
  • 12
2
votes
1 answer

Template Data Permissions

I have been adding event registrant features into my Apostrophe site. I created a new "leader" group, and if a user is part of that group, the event page should show a table with current registrant counts/basic information: {% for reg in…
Joseph
  • 865
  • 5
  • 20
2
votes
1 answer

apostrophe-blog - How to implement a next/prev. navigation through articles in show.html?

I'm quite new on apostrophe-cms but so far I've been able to dig a little around all the main features of this CMS (tutorials, customed widgets, templating,...) and I've successfully integrated the apostrophe-blog plugin and made it work properly as…
flowstack
  • 21
  • 3
2
votes
1 answer

How to enter non-rich-text?

Is it possible to enter non-rich-text into the text editor? The apostrophe-rich-text editor seems to add

tags around everything inside it. I'd like to format the widget.html like so:

{{ apos.singleton(data.widget, 'section-heading',…

aklouie
  • 31
  • 3
2
votes
2 answers

How to show pieces into the another pieces?

I have two type of pieces one is Authors and second one is Articles. I can show the list of articles (by using indexAjax.html and index.html in articles-pages) as it is implemented in Apostrophe's Demo and the list of Authors as well (by using…
Karlen
  • 1,294
  • 13
  • 20
2
votes
1 answer

how to serve static content outside the db?

I'm trying to figure out how to push static files, like an svg or an image, in a module without having to put it in the db. I've created a simple module that define a route with self.apos.app.get and with pushAssets I send js and css to render a…
diramazioni
  • 174
  • 9
2
votes
1 answer

Custom Image Gallery in Apostrophe CMS

What are all the possible sizes for images? Essentially, how do I get a list of images that have been "attached" to the page? I am trying to create my own image gallery since the default gallery is limited. Does that mean I should create my own…
Jeff Wilkerson
  • 376
  • 2
  • 18
2
votes
1 answer

Article published permission

I have two different user permission levels: editor and publisher (non-admin users) setup in my lib\modules\apostrophe-users\index.js definition: groups: [ { title: 'editor', permissions: [ 'edit-apostrophe-blog' ] }, { title: 'publisher', …
lance-p
  • 1,050
  • 1
  • 14
  • 28
2
votes
1 answer

Auto add users to Apostrophe

I'd like to extend a module (or create my own) to auto add users to Apostrophe (aposUsersSafe collection). I don't see any built in method in the apostrophe-users module for doing this, and am looking for some guidance as to how it might be…
lance-p
  • 1,050
  • 1
  • 14
  • 28
1
vote
1 answer

How to add a color separately to text shadow/Box Shadow in apostrophe CMS pallete

The problem is if I give the type as string the user will not be able to select a color from the color picker and if I give the type as color and templateValue to achieve this, the user will be able to select a color from the picker but not the…
ABGR
  • 4,631
  • 4
  • 27
  • 49
1 2
3
35 36