29 Nov 2024
Planet Plone - Where Developers And Integrators Write
Maurits van Rees: Lightning talks Friday
Bonnie Tyler Sprint
On 12 August 2026 there is a total solar eclipse that can be seen from Valencia, Spain. So we organise a sprint there.
This conference
We had 291 participants, 234 in person and 57 online. 13 Brazilian states (that is all of them), 14 countries.
24.5 percent women, was 13% in 2013, so that has gone up, but we are not there yet. Thank you to PyLadies and Django Girls for making this happen.
We had more than 80 presenters, about 30 lightning talks, lots of talk in the hall ways.
Thanks also to the team!
Ramiro Luz: Yoga time
Yoga exercise.
Rikupekka: University case student portal
We have a student portal at the university. But mostly:
Welcome to Jyväskylä university in Finald for Plone conference 2025, October 13-19!
Jakob: Beethovensprint
26-30 mei 2025 in Bonn, Duitsland.
Afterwards, on May 30 and June 1 there will be FedCon in Bonn, a SciFi convention.
Piero/Victor: BYOUI
Add-ons first development with @plone/registry. See https://plone-registry.readthedocs.io/
It allows for development that is framework agnostic, so it is not only for Plone. It is around configuration that can be extended and injected, which is tricky in most javascript frameworks.
Imagine it.
Ana Dulce: 3D printing
For a difficult model I had trust the process, it took a week, but it worked.
Renan & Iza: Python Brasil
We organised the Python Brasil conference from 16 to 23 October this year in Rio de Janeiro.
Next year 21-27 October in São Paulo.
Erico: Python Cerrado
31 July to 2 August 2025 is the next Python Cerrado conference.
29 Nov 2024 10:25pm GMT
Maurits van Rees: Paul Roeland: The value of longevity
Link to talk information on Plone conference website.
I work for the Clean Clothes Campaign: https://cleanclothes.org/
After three large disasters in factories in 2012 and 2013 with over 1000 deaths, it took three years to get an agreement with clothes manufacturers to get 30 million dollar compensation. It does not bring lives back, but it helps the survivors.
See Open Supply Hub for open data that we collected, for checking which brands are produced in which factories.
Documenting history matters. Stories must be told.
The global closing industry is worth around 1.8 trillion dollars, in a country that would put them on the 12th place in the world. 75 million workers.
Our strongest weapon: backlinks. We have links from OECD, UN, wikipedia, school curriculum, books. Especially those last two don't change ever, so you should never change urls.
Plone: enable the sitemap, please, why not by default? Create a good robots.txt. I weekly check Google Search console, looking for broken links. Tag early, tag often, great tool, even if you have an AI do it.
Our website: started 1998 written in Notepad, 2004 Dreamweaver, 2006 Bluefish, 2010 Joomla, 2013 Plone 4, 2020 Castle CMS (opinionated distribution of Plone, but does not really exist anymore) 2024 Plone 6 with Volto Light Theme (work in progress). Thank you kitconcept for all the help, especially Jonas.
Migrations are painful. Along the years we used wget to csv to SQL to csv, Python script, "Franken-mogrifier", collective.exportimport.
Lessons learned: stable urls are awesome, migrations are painful. Please don't try to salvage CSS from your old site, just start fresh in your new system. Do not try to migrate composite pages or listings.
What if your website does not provide an export? Use wget, still works and is better than httrack. sed/awk/regex are your friend. archivebox (WARC).
Document your steps for your own sanity.
To manage json, jq or jello can be used. sq is a Swiss knife for json/sql/csv. emuto is a hybrid between jq and GraphQL.
Normalize import/export. We have `plone.exportimport` in core now.
In the future I would like a plone exporter script that accepts a regex and exports only matching pages. Switch backends: ZODB, relstorage, nick, quantum-db. Sitewide search/replace/sed. Sneakernet is useful in difficult countries where you cannot send data over the internet: so export to a usb stick.
A backup is only a backup if it regularly gets restored so you know that it works.
- Keeping content and URL stability is a superpower.
- Assuming that export/import/backup/restore/migration are rare occurrences, is wrong.
- Quick export/import is very useful.
Do small migrations, treat it as maintenance. Don't be too far behind. Large migrations one every five years will be costly. Do a small migration every year. Do your part. Clients should also do their part, by budgeting this yearly. That is how budgeting works. Use every iteration to review custom code.
Make your sites live long and prosper.
29 Nov 2024 8:58pm GMT
Maurits van Rees: Fred van Dijk: Run Plone in containers on your own cluster with coolify.io
Link to talk information on Plone conference website.
Sorry, I ran out of time trying to set up https://coolify.io
So let's talk about another problem. Running applications (stacks) in containers is the future. Well: abstraction and isolation is the future, and containers is the current phase.
I am on the Plone A/I team, with Paul, Kim, Erico. All senior sysadmins, so we kept things running. In 2022 we worked on containerisation. Kubernetes was the kool kid then, but Docker Swarm was easier. Checkout Erico's training with new cookieplone templates.
Doing devops well is hard. You have a high workload, but still need to keep learning new stuff to keep up with what is changing.
I want to plug Coolify, which is a full open source product. "Self-hosting with super powers." The main developer, Andras Bacsal, believes in open source and 'hates' pay by usage cloud providers with a vengeance.
Coolify is still docker swarm. We also want Kubernetes support. But we still need sysadmins. Someone will still need to install coolify, and keep it updated.
I would like to run an online DevOps course somewhere January-March 2025. 4-6 meetings of 2 hours, maybe Friday afternoon. Talk through devops and sysadmin concepts, show docker swarm, try coolify, etc.
29 Nov 2024 7:58pm GMT
Maurits van Rees: Ziming Yuan: How a Beginner Built an RSS Feed Provider in Volto
Link to talk information on Plone conference website.
I am studying computer science. This summer I have participated in the Google Summer of Code for Plone. Thank you to mentors Paul, Roeland and Mike!
I have built several full-stack web apps with React, but am new to open source.
What is RSS? It is Really Simple Syndication. It is used by websites to publish updated information, such as blog or news. It lets users decide what they read every day, instead of algorithms.
In Plone the RSS feed should use a catalog query to filter contents, for example a feed of science articles or of events.
For an RSS feed content type we could use a collection behavior or a blocks behavior with a listing block. The listing block is the way to go for Volto. So I did that. Plus extra fields like maximum title length and maximum description length.
I created a view component for the content type. Important is the Express middleware with which we got information from the backend.
We decided on `rss` as Node package for the feed. We looked at another newer one called `feed`, but it did not work for us or was missing features.
There were challenges for me as person new to Plone. Do I really understand the code? Often the answer is: no. For example ZCML? i18n? XML files in the profiles? There is a really nested structure. Create a new project, then you have backend / src / rss / src / rss, at least something very deeply nested. It was always confusing to me as I did not really know what should end up in git or in a release. The worst is that I don't know what are the most important files.
And what if my code fails, it was hard to understand errors on the front end. There are just too many things that may be the source of the error.
Another challenge: what if I want to create something new? The training lets you learn by example. But what does each line of the example code actually do? Are there other options?
Missing documentation: how do prevent the user from removing the title or rss block? We found out about initialBlocks per content type. And prevent adding new blocks? There is a feature disableNewBlocks, that could be set on an individual block, but what about doing this for all instances of this content type?
An overview of the code base would be good. How different components are connected, how different files work together. A guide about how to approach the source code, what files I should look at first.
For developers new to Plone: the source code is your friend, the Plone community is helpful, but be specific in the questions you ask, and tell what you have already tried.
Source code:
29 Nov 2024 6:52pm GMT
Maurits van Rees: Érico Andrei: Plone + pytest: Tips and tricks
Link to talk information on Plone conference website.
Plone loves tests. The first was committed in October 2002 by Sidnei da Silva. We have used lots of different testing framework. I like using pytest
. The unittest
framework was inspired by Java testing and you see it. pytest is simple and pythonic. It does dependency injection, which can look magical, okay. There is a large ecosystem of plugins. It has support for unittest. There is a Brazilian maintainer.
I have created pytest-plone, built upon zope.pytest. It provides fixtures and helpers. it is the default in cookieplone templates. Take a look at plone.distribution and plone.exportimport for examples.
Golden rules
If you need a Plone site in your test, you need to wrap your test in a class. That helps for not tearing down everything after every test. Start with a method that gets portal and probably get_fti, and use @pytest.fixture(autouse=True)
.
Use @parametrize
to run the same test function with multiple inputs and output.
Use fixtures.
Trust and love pytest plugins. There are plugins for running the tests in random order, or in parallel. Code coverage is a plugin. You can start a docker container.
Use helpers in pytest-plone to check that your latest upgrade step matches the metadata profile version. Check that your add-on is installed.
plone-pytest 1.0 is coming. Small problem: the tests are breaking on Python 3.9.
Write more tests with less code. I will sprint on pytest-plone.
29 Nov 2024 6:52pm GMT
Maurits van Rees: Fabiano Weimar: Plone on Kubernetes
Link to talk information on Plone conference website.
Kubernetes (k8s) is an open source system for managing containerised applications It provides mechanisms for deployment and scaling. It is part of the Cloud Native Computing Foundation.
Kubernetes' benefits are scalability, fault tolerant, self-healing, efficient resource utilisation, declarative configuration, rich ecosystem.
Kubernetes basics:
- pods: the smallest deployable unit of computing, consisting of one or more containers. Containers in one pod can talk with each other like they are all on localhost.
- deployments: manage the replication and updates of pods
- RepicaSets: manage a fixed number of identical pods.
- StatefulSets: manage stateful apps, lik databases
- Jobs: one-off tasks
- CronJob: regular tasks
- ConfigMap: store configuration data
- Secrets: store sensitive information
- PersistentVolumeClaims: request storage
- PersistentVolumes: actual storage
- Pod Disruption Budgets (pdb): limit the number of pods that can be unavailable at any given time, for example during upgrades, self-healing during disaster recovery.
- Autoscaler: automatically scale the number of nodes in a cluster based on workload. Resource optimisation.
- Ingress: routing external traffic to services, SSL termination, load balancing, caching, rate limiting.
- Operator: software extensions to Kubernetes that make use of custom resources to manage applications and their components. Think of this as a human operator who would go in and do some stuff.
Plone components as Kubernetes resources:
- Plone backend: StatefulSet
- Plone frontend: Depoloyment
- PostgreSQL: StatefulSet
- Varnish: Deployment
- nginx
- cronjobs
Kubernetes for Devops. It has a steep learning curve. For your laptop you have microk8s and k3d so you have the Kubernetes api, although without the options that you would have with multiple machines. Basics: `apt install docker.io` and `snap install kubectl --classic` and `snap install heml --classic`. And read https://k3d.io/
At the Alpine City Sprint this year we worked on helm charts for Plone: https://github.com/plone/helm-charts/
Tips and tricks:
- You can use ArgoCD to automatically do a deploy when something changes in a git repo. You need to configure this correctly of course.
- Plone can do better on integration with proper observability tools like Grafana and Prometheus. For example, how can such tools get the logs when they are in multiple places.
- Use ZODB with PostgreSQL and relstorage. I think it is the most stable implementation today.
- Varnish Operator from IBM looks promising when you want to run multiple instances of varnish.
- If you run the `test.sh` from Plone help charts this may use a lot of bandwidth downloading docker images. k3d supports import of docker images so they are in a cache.
29 Nov 2024 2:39pm GMT
Maurits van Rees: Rikupekka Oksanen: Building a secure video portal for researchers
Link to talk information on Plone conference website.
We needed a video platform for our university. Difficult, but we had a dev team of 8 with some architecture experience, so let's try. We did a successful POC in 2023.
We use: Plone 6, VideoJS player, Wowza streaming engine, Keycloak, WhisperX, Camunda 7, Nomad. Most important: open source and license free.
Security. We have it in a dedicated and separate server environment. All data is stored on own servers of the university. All data and files are encrypted. Plone is very secure. All transactions are logged. There is a process for data protection, and it has been reviewed and documented.
There was no definite deadline, which is both good and bad. We could focus on quality, but also needed to focus on other projects.
Now a nice working demo.
[Sorry, I was distracted by client work.]
29 Nov 2024 1:54pm GMT
24 Oct 2018
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Help Oshane get to the Tokyo Plone Conference
Summary
Oshane Bailey, a talented Plone developer with loads of Plone experience has been selected as a presenter for the 2018 Tokyo Plone Conference. His Japanese visa was just approved.
He will share a streamlined approach to Plone development that he is applying on a Plone project targeted at Jamaican Developers. At the time of writing he has raised about 17% of the funds he needs to get to Tokyo. You can help him get to Japan by contributing to his crowd-funding campaign.
Oct 29, 2018 update
Thanks to generous contributions, Oshane's trip is now 70% funded. You are welcome to join the crowdfund and cover the rest of his trip.
Oct 30, 2018 update
Oshane's trip is now 89% funded. The plane ticket and conference ticket have been purchased. you can still pitch in by joining the crowdfund to cover the rest of his trip.
Since at least 2015, Oshane has worked on Plone projects for teams around the world and in the process has been exposed to varied approaches to the development and ongoing management of Plone sites. Over recent months he has poured his, hard earned, experience, into a side project -- the Jamaican Developers site. Through this project he has refined a continuous development pipeline based on some of the best techniques used in the Plone community and enhanced with some of his own innovations.
Last year Oshane participated as a Plone Google Summer of Code student and presented his work at the Barcelona conference. He also participated in the after-conference sprints, contributing to efforts to port Plone to Python 3 and also looking into the WebSauna project.
Supporting his trip to Tokyo will serve to enrich PloneConf 2018 in many ways. Here are three that spring immediately to mind:
1) As part of his talk he will share the techniques he is using on the Jamaican Developers site
2) He plans to participate in the after conference sprints.
3) He will bring an important perspective to discussions influenced by constraints common to Jamaican developers.
How to Support Oshane
Appropriately, his crowdfunding campaign is running on the Jamaican Developers site that he built with Plone. His goal is to raise enough to cover his travel and expenses related to the Japan trip.
As we say in Jamaica... "Follow back a me" as I support Oshane's trip to PloneConf2018 in Tokyo.
24 Oct 2018 3:38am GMT
19 Oct 2017
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Plone Conf 2017 Day 2: Timo Stollenwerk: Building Bridges - The Headless Future of Plone
I decided to try a Maurits van Rees and live blog a conference talk.
Talk by Timo Stollenwerk on Building Bridges - The Headless Future of Plone
Plone's headless future
Working on what we call headless these days started in 2014
You already heard a part of this from the Keynote (about Pastanaga UI etc..) on the first day so I won't repeat that.
My ultimate goal is to bring the vision to reality.
A few observations
- Mobile is overtaking Desktop (Plone is mobile ready but Pastanaga aims to have the best experience on every device)
- Open Source is Mainstream (Plone is different, today large open source projects are coming from large players like Facebook and Google, this helps to make open source more mainstream). Github looked at contributions last year and visual studio code was the project that had the most contributions... Microsoft!!)
- Javascript is taking over (Javascript is becoming more important, if you are a web developer in 2017 you have to learn modern Javascript)
- The Web is everywhere (I visited my Uncle who is a Doctor, 5 years ago and noted that he was using a web app on his desktop for viewing scans of the body)
In recent studies they discovered that swift is losing popularity because web technologies are taking over. The web is coming back with technologies like Electron (Desktop) and Cordova (mobile)
Isn't it a great time to be a Web, Javascript, Open Source developer in 2017?
We're hearing that the CMS market is dead
If we see it in other sectors we say it is more efficient but when it happens to us we don't want to transform ourselves for the better. I think we are living in exciting times...
If JS is so great why don't we just go with it and build a CMS with Javascript?
Why do we keep using Python and Plone?
- I love Python (wasn't my first language, but the first one I loved, I still miss Python with every line of Javascript I write). I can live with Javascript for the tooling and the community but would prefer to keep Python. I can't imagine using Node on the backend because I think Python is doing a way better job on the backend.
- Plone the community. In the last year I've been to Jenkins, CI and testing conferences but there's no place like Plone.
I went to a JS conference alone. Usually when you go to a conference alone you need to make an effort to talk to persons. Then I went to the sprint but out of 1000 persons there were only 20 or 30 persons at the Sprint. When I speak to Python conference attendees they ask me, how do you get people to come and even pay for a flight to Plone conferences, it's like magic!
- Plone the Software is still unique (permissions, traversal, workflows)
- Plone the CMS (as Eric says, Plone is doing Breadcrumbs since 2001) Go out and try all the Javascript CMSes, they all have awful user interfaces, they have nice libraries and everything you can imagine but lack the basic functionality of a CMS. I couldn't just jump and move to another system because I'd only have half or 10% of the current functionailty I have now. We don't want to become Grandpas and isolate the new JS communities who have lots of energy
What do we have now?
Stabilising JS frameworks, it's not too hard to switch between VueJS, React, Angular. Which one you use depends on if you like a library vs a framework. How do we handle this? We want to give our clients something that can be supported over the next 5 to 10 years. That's a lot of time. If you look at Plone we are able to provide that. How do you handle that? The answer is plone.restapi (restful hypermedia for Plone).
Our idea with plone.restapi is to use it as a bridge. Stability on the backend with flexibility on the frontend. In two or three years the JS ecosystem will change further.
Status of plone.restapi
It is stable and used for 3 years, it is used in production by several companies. We consider plonerest.api to be feature complete.
I asked Eric what is plonerest.api missing, he said "nothing".
I'm just lazy about releasing a 1.0 release.
We can get back to our vision with plone.restapi being stable.
So we can get back to our vision of bridging...? One of our ideas about building with Plone 5
You can use React in the core today, if you want to go with a full framework like Angular you can too. We have 3 branches and the plonerest.api allows us to build bridges between
standard plone and the other branches.
How do we make this happen?
Regarding stories... Victor sometime says to me "Should we really say that, going on stage and telling people about these things? They will expect it to happen."
So who here would like to have Pastanaga UI today and use it. With projects in the Plone community we've building like that...
when we should be building like this..
I believe that if we want to have that we need to start with the Minimal viable product. Something, not just for users but for companies that can give them value right away. I want that skateboard.
What do we need to get that skateboard?
- Login
- Content Editing
- Image upload
That might sound easy but it is not. We're aiming for making Plone stand out, we want people to be like "wow, that's the greatest editing experience I've ever had". I want us to iterate over that and focus on that user story.
I want to make image upload really easy. One thing we need to solve on a technical level, we currently have created a Medium-like editor but we don't have image scaling (something we take for granted in Plone). I want us to have the ability to add the image and have scaling done "magically".
There are things that are essential for an MVP
- Performance
- Image uploading
- SEO
If we don't have this, users will abandon pages. Modern page builders focus on this (e.g. gatsby js is a modern page builder built in ReactJS). If you want to compete we have to provide users with a great out of the box performance. We'll need to use all the tooling, webpack etc...
We will also need server-side rendering. We saw that, without server-side rendering at kitconcept we can't do good SEO.
Visit https://github.com/plone/pastanaga#minimal-viable-product for details on our projections of a MVP.
Next
We have an open space at the conference and there will be sprints.
Real world projects (if you have any projects and want to use plone.restapi, angular sdk, plone.react, please talk to us)
At kticoncept we have a few projects where will do that
Sponsorship (we may be able to do something on that front)
Summary
We have a stable platform in plone.restapi for building bridges
I think Plone's future is bright is we combine our knowledge and experience with the new things
Pastanaga UI is really greate
I hope we can provide you with a roadmap
The great thing about the Plone community is tha tyou start with an idea and...
let's get together and do Plone magic together!
19 Oct 2017 8:48am GMT
07 Sep 2017
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Help two Plonistas get from Jamaica to Barcelona (Catalonia) for the 2017 Plone Conference
Jamaica to Catalonia for Plone Conference 2017
TL;DR - David Bain and Oshane Bailey are looking to attend the 2017 Plone Conference via crowd funding.
- Sept 20, 2017 Update: We will mostly be walking so this reduces our transportation costs, we've adjusted our target to reflect this. We've extended the campaign until September 27.
- Sept 17, 2017 Update: We're finding some cheaper fares, adjusting our target to reflect this
- Sept 16, 2017 Update: Oshane has been offered a free room, this will lower the overall target further
- Update: It looks like there are more cost effective accommodation options, as a result, we've further adjusted our estimates.
- Update: We have found some cheaper flights via Google Flights so we're adjusting our estimates down by $2,000.
(David's the one on the right).
This is a manually managed crowdfunding tracker updated by David (no AI was harmed in the creation of this tracker)
We are trying to get from Jamaica to Catalonia for the 2017 Plone conference. Our target is to raise a significant part of the roughly USD$7,000 USD$5000 USD$4,400 USD$3,700 USD$2,900 needed to cover airfare, accommodation etc.
How to support us

Why support us?
Getting us there will allow David to deliver training and a talk or two, Oshane will be able to share his Google Summer of Code experiences and participate in his first face to face community sprint after the conference. Oshane worked this summer on improving the theme editor experience, here are some links with more information about what he did...
https://community.plone.org/t/gsoc-2017-improving-the-theme-editor-experience/3906
https://community.plone.org/t/thank-you-for-the-support-during-gsoc-2017/4792
We're hoping he'll be able to present his experience as a talk at the conference.
David has been an active part of the community for many years. He delivered training and two talks at the last conference and has been invited to be part of the training team at the 2017 conference as well.
Both of us are really excited to participate this year, however the cost of airfare is prohibitive.
* While Oshane will stay for the sprints, due to family commitments, David won't be able to stay for the sprints.
Rough Breakdown of expenses
07 Sep 2017 1:23am GMT
03 Aug 2017
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Why you had problems figuring out Plone (the webinar)
Presenting... Why you had problems figuring out Plone (the webinar). Okay, that's not the actual name of the webinar. Instead, we went with the more descriptive but slightly less clever Plone for Newbies - The Big Picture.
The Big Picture is about understanding the model.
If you're a developer about to begin your journey of Plone development, The Big Picture aims to fill out your understanding of how the pieces of Plone fit together. Thinking of it as a purpose built system lays a strong foundation for success.
Only smart persons use Plone
I've heard someone suggest that you have to be really smart to use Plone (implying that it is hard to use). I call it the "this helicopter is harder to use than my bicycle" problem. Every time I benefit from Plone's link integrity support, flexible access control model or use cut and paste to move content around I'm glad I'm not using a "bicycle". I like to point out Plone's comprehensive suite of tools which you'll be glad exist when you need them. For developers, once you accept that you're looking at a "helicopter" you need to spend a little time "understanding the model". As you understand the purpose of the major controls you'll find it easier to use the system to solve problems.
Why Plone?
Now is the right time, with an increase of cybersecurity related issues, organizations should be looking to adopt secure platforms. I've been using Plone for more than 15 years, and I can confidently recommend it as a secure platform. In case you took your eye of Plone for a few years, now is a great time to give it a second look, it has kept up with modern development practices and remains an excellent choice for your content management needs.
Why a webinar?
My target audience isn't in one geographic location, the most effective way to reach them is a virtual medium and webinars provide a well-known, tried and tested approach.
Additionally, I have run one or two webinars before, if you count online training courses. Of course, it is different when you are doing more than just showing up, reaching out to a "less captive" audience and convincing them to commit 90 minutes to a webinar. So this is new ground for me. I am learning a lot from this experience and have had a fleeting thought, maybe I'll take all this webinar and Plone stuff and do the "meta" thing, build a webinar management tool on top of Plone. You never know.
03 Aug 2017 10:32pm GMT
29 Jun 2017
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Plone 5 custom views using Rapido 1.1.1
After you've created a custom content type through the web (TTW), you'll want a custom view to go with it. In this simple example we create a custom youtube page content type and a supporting view all TTW.
Step 1 - Create a new content type
Start by creating the content type through the Dexterity Types control panel.
Site Setup > Dexterity Types
Select and clone the "Page".
.. ..
Then add a "youtube_url" field.
After adding your first "Youtube page" you'll notice that the default view isn't showing us the "youtube_url" field that we added. We'll fix that in the next step.
Step 2 - Create a custom rapido view
.. ..
The video below explores the building blocks of our custom view. After some tinkering we settle on the id youtube-page-view for our view.
.. ..
Gotchas with registering view ids
What was not recorded in the video was the fact that the view id youtube-page had been used in the context of a different rapdio block (I was practicing before the real recording). If you were paying careful attention to the demo video you may have noticed some unusual behaviour when trying to use the view named youtube-page. When you define a view id and then change it later on, the id expects to work with the originally registered block. I've found that restarting the instance resolves this issue.
29 Jun 2017 2:09am GMT
14 Jun 2017
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Plone theming: Injecting a class into an existing tag with Diazo and xsl
In a recent post (https://community.plone.org/t/textareas-not-displaying-existing-content-when-my-theme-is-enabled/4117/2?u=pigeonflight) I mentioned a Diazo rule where I was injecting a new class into a tag, I used an <xsl:template>.
The following example adds a special class "gl-textarea" to all <textarea> elements it uses a Diazo <replace> directive instead of an <xsl:template>.
... ....
If you've done enough xslt then you probably know that this could have been achieved with an <xsl:template> element, the problem is that <xsl:template> elements won't work in all scenarios when using Diazo.
A note about Diazo, <xsl:template> and nested scenarios
<xsl:template> elements in nested rules will fail silently. This also means that externally included files will also fail because rules in externally included files are implicitly nested.
So something like this, if located in the main rules.xml file, should work:
<rules>
<xsl:template>
...
</xsl:template>
</rules>
This will fail, because it is in a nested <rules> element.
<rules>
<rules>
<xsl:template>
...
</xsl:template>
</rules>
</rules>
On the other hand, Diazo's <replace> directive can be used as a work-alike to the <xsl:template> element and it works in nested scenarios.
Don't do this
Here's the <xsl:template> approach which works in very specific scenarios.
... ...
When you can do this
For comparison, here again, is an example that uses the <replace> directive and should work in most scenarios.
... ....
Don't forget to include the apply-template, it is needed.
14 Jun 2017 11:28pm GMT
07 Jun 2017
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Reading other people's code - first hour towards building custom tiles for plone.app.mosaic
TL;DR looking at other people's code - my first steps in getting started with creating custom tiles for Mosaic involved looking at how other people did it.
Mosaic is a layout solution for Plone which allows end users to create custom page layouts within a Plone website (video) using a simple drag and drop. There are ready made tiles for common situations, however I am starting to come across situations where the default tiles aren't what I want.
I decided it was time to explore the creation of custom tiles. I figured the best way to get going would be to look at how others have created custom tiles. I knew that custom tiles were used in the creation of the Plone 2016 conference website and that the source code for the site was published on github. I started by inspecting their code.
I setup Plone 5.0.7 with Mosaic 2.0rc5 and also the ploneconf2016 site profile (https://github.com/plone/ploneconf2016.policy). The code for the tile configuration is here: https://github.com/plone/ploneconf2016.policy/tree/master/ploneconf2016/policy/tiles
Once everything was installed I was able to create a fake conference website and add presentations, persons (speakers/presenters) and a few other content types.
The policy defines two custom tiles
- A slider tile
- A presentation tile
I was able to use both custom tiles without issue, the slider custom tile doesn't work out the box, meaning I could define the slides but the actual sliding didn't work. The slider depends on other components that are provided by the ploneconf2016 theme. It shouldn't be too hard to add the right CSS and JS to my own theme to get the slider working the way I want.
One note, when I cheated by not including a speaker on my presentation item, things "broke". To be fair this is to be expected since the presentation content type does have a red dot indicating that speakers are required items on presentations.
I got this error on the console
```
...
Module zope.component._api, line 120, in queryMultiAdapter
Module zope.interface.registry, line 245, in queryMultiAdapter
Module zope.interface.adapter, line 541, in queryMultiAdapter
Module plone.jsonserializer.deserializer.converters, line 69, in from_unicode_converter
Module zope.schema._field, line 322, in fromUnicode
Module zope.schema._bootstrapfields, line 183, in validate
Module zope.schema._field, line 338, in _validate
ConstraintNotSatisfied: (u'350d0a34ffcb4fc4943efdcf4bdb9f03', 'content_uid')
```
A quick guess... the content_uid was probably referring to the missing speaker.
I consider this a great first experiment. I have all the pieces working and I know how the code was put together. My next steps are 1) customize one of the conference tiles 2) create and register a brand new tile of my own.
07 Jun 2017 12:03pm GMT
30 Nov 2016
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Small Plone team ready for interesting problems
Starting December 1, 2016 the Alteroo team will be available for new Plone gigs.
Our team members are ready to dive into modern Plone development including Diazo and Mosaic on Plone 5. We also have experience with older versions of Plone.
If you're into checking boxes we also have experience with Javascript/ReactJS/Webpack/Babel, Pyramid/Kotti, Firebase, QA, Linux server administration and General Design skills.
Send an email to newgigs - [ at ]- alteroo.com.
30 Nov 2016 9:17pm GMT
17 Nov 2016
Planet Plone - Where Developers And Integrators Write
David "Pigeonflight" Bain: Installing Plone 5 on Windows: Part 2 - Installing Plone
This is part 2 of installing Plone 5 on Windows. The following instructions are specific to installing Plone 5 on Windows. Part 1 covered preparing your Windows machine for Plone.
Assumptions
- Your system has been configured using the steps outlined in part 1 (see: prepare your Windows machine for Plone).
- You have a reasonably reliable internet connection
In the steps below you will clone the buildout then run an initializaton script called "setup.bat"
Step 1 - Install Virtualenv
Launch git bash and run the following to install virtualenv.pip install virtualenv
Step 2 - Clone the buildout, run the setup script and bin/buildout
git clone https://github.com/collective/themedev.buildout
cd themedev.buildout
./setup.bat
bin/buildout
Day to Day Usage
bin/instance fg
17 Nov 2016 6:10pm GMT