Monday, December 14, 2015

Semantic UI + Plone + RequireJS (just a gist)

I wanted a way to include a jquery plugin in a Plone 5 add-on that I'm working on, but I really wanted to find the simplest way, without using bundles and registering resources with Plone's Genericsetup mechanism.
I was able to pull it off with standard page templates and static resources and it ended up being very close to the way it would be done without all the additional framework related code.

Perhaps I will go into more detail about this approach at a later date. But, following the principle of release early, release often, I'm posting a gist of what I've been doing.

Here's a screenshot of a page that's using the ratings component provided by SemanticUI (a jquery plugin).



I've posted the code with some explanatory notes as a github gist available here: https://gist.github.com/pigeonflight/69313231ad8c8a38082f

Hopefully it will save someone lots of time.

2 comments:

Unknown said...

Nice!
Note: it is currently a secret gist. You may want to make it public or non-secret or how it is called, so people do not have to login to view it.

David B said...

Fixed the secret gist issue.

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos