apostrophe-cms

.htaccess redirect permanent www.domain.com/A to www.domain.com/A/B

为君一笑 提交于 2019-12-24 09:37:26
问题 A is an empty folder, simply used for building up my hierarchy of pages. It contains B,C which are also folders (non empty) The hierarchy comes from the Apostrophe CMS . The following rule does not work in .htaccess: Redirect permanent /A http://www.domain.com/A/B because it ends up to : http://www.domain.com/A/B/B/B/B etc since the rule is invoked over and over. Can anyone point me to a solution ? Thanks 回答1: Try using RedirectMatch and include the "end of string" $ in the regex.

Apostrophe CMS: Hosting questions + feasible to get into without Symfony experience?

只谈情不闲聊 提交于 2019-12-24 08:18:35
问题 I am looking for a clean, well-built CMS. I want to migrate a number of sites away from a self-built CMS which I will not be developing further. I've come across Apostrophe and instantly fell in love with the great, integrated user interface. It is based on the Symfony framework, which I have practically no experience with. My questions: I am planning to deploy sites I build with this CMS on shared hosting packages which do not offer any command line access. I know that many of Symfony's

How to enter non-rich-text?

只愿长相守 提交于 2019-12-24 04:33:29
问题 Is it possible to enter non -rich-text into the text editor? The apostrophe-rich-text editor seems to add <p> tags around everything inside it. I'd like to format the widget.html like so: <h2>{{ apos.singleton(data.widget, 'section-heading', 'apostrophe-rich-text') }}</h2> but the output wraps the text in <p> tags so they override the <h2> . Is there any way to override this behavior? 回答1: I figured it out. You have to use the "string" type in the index.js. For example in the /widget-name

Custom Image Gallery in Apostrophe CMS

旧巷老猫 提交于 2019-12-24 01:16:12
问题 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 widget that extends 'apostrophe-images-widgets'? So once I do that, and add the widget to a page, and add images, how do I get the list of images? I want to get a thumbnail size, and a larger size of the image to be placed in a modal? What are all the

Check headers on each page request

淺唱寂寞╮ 提交于 2019-12-23 17:02:14
问题 I need to check the request headers on each page request. I thought the place to try this would be in the 'apostrophe-express' module. I've created my own module 'auth' that extends 'apostrophe-express': module.exports = { extend: 'apostrophe-express', name: 'auth', alias: 'auth', absoluteUrl: function(req, res, next){ console.log(req); } }; But this isn't working. I'm getting an error 'apostrophe-templates\index.js" 597 req.browserCall('apos.pageReadywhenCalm($("body"));')' Can you tell me

Pushing Assets to the Browser - Your Own Theme Module

与世无争的帅哥 提交于 2019-12-23 03:37:34
问题 For some beginners including myself , still figuring out on how to make our own theme module. But this is how I found a solution myself. Please Note : I don't know if this effects the performance issue on ApostropheCMS , but I'll leave this as a solution for all of us. Let's Begin ! (See Answer Below) : 回答1: It is not necessary or advisable to write your own link and script tags because this prevents Apostrophe from minifying your assets in production, and from compiling your LESS files as a

Apostrophe cms - inline editing of rich text in custom widgets?

别等时光非礼了梦想. 提交于 2019-12-20 07:07:00
问题 I can't make inline editing of rich text save back to the db in some cases. Please bear with me, there will be some code pasted here, as it is the only way I can describe what I'm doing. I have two kinds of custom widgets in my project - the ones where there is only one instance of the widget, typically defined like this in the lib\modules directory: article-widgets - views - - widget.html - index.js And then the kind of widgets that are repeated, and can be used in several places around the

How-to access widget data in helper

谁说胖子不能爱 提交于 2019-12-19 04:44:04
问题 in my frontend helper I use a parameter and give it everywhere data.widget. Is it possible to access data.widget in the helper context? I've only found the self.output object tree. But I think that is not a solution with good quality. Thanks. Edit for code sample: Well, in a template you can do something like: {{ apos.myModuleAlias.iCallAHelper(data.widget) }} And the part of myModule-widgets/index.js: construct: function(self, options) { self.addHelpers({ iCallAHelper: function(data) {

Issue connecting to Mongo Atlas from Apostrophe CMS application on Elastic Beanstalk

↘锁芯ラ 提交于 2019-12-13 03:36:02
问题 I followed the instructions here to deploy my apostrophe cms website to aws elastic beanstalk. The mongodb doesn't have any whitelisting restrictions and is open to everyone. I set db coonection string as an environment variable using eb setenv APOS_BUNDLE=prod-bundle APOS_MINIFY=1 APOS_MONGODB_URI=mongodb://admin:password@cluster0-shard-00-00-xyz.mongodb.net:27017,cluster0-shard-00-01-xyz.mongodb.net:27017,cluster0-shard-00-02-xyz.mongodb.net:27017/demo-io?ssl=true&replicaSet=Cluster0-shard

Adding Link for Button Action

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 03:26:03
问题 I recently started a new site with Apostrophe CMS, and one of the features in the project will be extending apostrophe-events to have a list of "registered" users who are associated with each event. I was able to add a new joinByArray column to the apostrophe-events module, and it works correctly when editing events. Now, I'm trying to add a Register button to the apostrophe-events-pages module, so that users can register for the event from each event's page. I currently have a working API