thomasbnielsen / silverstripe-content-blocks Goto Github PK
View Code? Open in Web Editor NEWSplit your page content into manageable blocks/sections of content, each with their own template
Split your page content into manageable blocks/sections of content, each with their own template
GridFieldOrderableRows writes the sort order to all relations instead of just the currently active. A fix is to use SortableGridfield:
https://gist.github.com/NobrainerWeb/9205539
https://github.com/UndefinedOffset/SortableGridField/blob/master/docs/ManyManyExample.md
Hi,
This is really a great module! I just started to develop something simular, but stopped with that after I found this module.
One issue I experience: in the templates tab I get this error:
Warning: The folder ../themes/simple/templates/BlockTemplates/ was not found.
first: my theme is not called "simple".
second: I copied the folder BlockTemplates and block.css manually to my theme and just for sure also to the "simple" theme.
But still this error. I hope you can tell me what I did wrong.
Thanks in advance!
Hi,
While trying to add a block getting the error
(top right corner)
Any idea.
Version: 3.2.0
Thank you.
https://github.com/NobrainerWeb/Silverstripe-Content-Blocks/blob/master/code/controllers/BlockController.php has your E-mail hardcoded, use config api instead.
Maybe fallback to Email.admin_email if not configured properly
[Warning] copy(/Applications/MAMP/_/*******/themes//css/block.css): failed to open stream: No such file or directory
GET /dev/build?flush=all&flushtoken=b3a9e4ec426e14ab0702788682dffdfe
Line 78 in /Applications/MAMP//**********/content-blocks/code/ContentBlocksModule.php
Source
69 parent::requireDefaultRecords();
70
71 // If css file does not exist on current theme, copy from module
72 $copyfrom = BASE_PATH . "/".CONTENTBLOCKS_MODULE_DIR."/css/block.css";
73 $theme = SSViewer::current_theme();
74 $copyto = BASE_PATH . "/themes/".$theme."/css/block.css";
75
76 if(!file_exists($copyto)) {
77 if(file_exists($copyfrom)) {
78 copy($copyfrom,$copyto);
79 echo '
In a website where I use de modules subsites and translatable I get this error when I add a translation page in the translations tab:
PHP Fatal error: Call to a member function Blocks() on a non-object in /home/sites/development/000_SILVERSTRIPE/www/content-blocks/code/ContentBlocksModule.php on line 100, referer: http://www.website.hst.nl/admin/pages/edit/show/109?locale=nl_NL
On a site where Silverstripe is located in a subdirectory the template thumbnails are not shown in the admin interface. That's because the file detection uses the path on the server (which is working) but constructs a wrong URL for the browser. The subdirectory is missing.
A possible solution would be to change the line 133 in file Block.php from
$imgsrc = "/themes/".$theme."/templates/BlockTemplates/";
to
$imgsrc = Director::absoluteBaseURL()."themes/".$theme."/templates/BlockTemplates/";
Best regards
Hi,
I was just trying to install this package today to give it a go and see how it works as this is a type of functionality I would really like to include in my sites... Unfortunately it looks as though there is a conflict in version for the gridfield extension. This package requires version 1.0.x I believe and the userforms module requires 1.1.x so I'm unable to install both at the same time... Though I would just mention this incase you missed it or you don't use userforms.
Thanks,
Colin
When creating a block using the modeladmin section from the cms. I am unable to choose the block type (when there are custom blocks (extended block) defined.
How about adding versioning of the blocks? Could be complicated with many_many and nested blocks though.
SS Noob here so please bare with me!
EDIT: removed original errors to update on current status.
I have all the module and all dependencies installed. All "private" have been changed to "public" in .php files for content-blocks and all dependencies. Permissions have been fixed. No errors upon /dev/build.
Block Admin is working. I can create a new block, navigate all tabs, use all buttons, and save. Thumbnails show.
My problem is when I'm in the "Block" tab for a page. The drop down list is working. However, when I click the "Add" button it takes me to my home page. The button displays "WebsiteURL/#" and that's it. When I look at the "Add Block" button from within the Block Admin it shows "WebsiteURL/admin/blocks/Block/EditForm/field/Block/item/new". I'm not sure what is missing, and I'm not sure where I should be looking for it!
Please help!
It seems as if betterbuttons (https://github.com/unclecheese/silverstripe-gridfield-betterbuttons) has changed naming of their buttons. The betterbuttons.yml seems to be outdated, e.g. Button_Save
is not found, it should be rather named BetterButton_Save
. Either the buttons need to be renamed or the dependency should refer to a version that uses the old name scheme.
Either per config setting and/or method with hook, so we could overwrite it per pagetype. Would be great if it was compatible with https://github.com/wernerkrauss/silverstripe-folderperpage, at least with a wrapper.
I suppose it should look if owner has a method "getUploadFolder(type)" which returns the value for images, files etc...
If not take the config value.
Related #21
At the moment lots of your dependencies are locked to patch releases (1.2.*
) rather than to minor releases (1.*
)
SemVer says that these releases should not cause breaking changes and so it should be safe to lock to.
The current approach means that there can be incompatibility between modules or sites that have their own requirements.
If a group have all permissions set exclude the "full admin" option the user of this group can not see any blooks in the admin panel "Blocks" and can not see Blocks in the tab "Block" of a page.
The selection field "choose type" and the field "+Add" above the "Content blocks" at the Blocks tab was not displayed if the "full Admin" permission was NOT set.
The "can access Blocks" option permission only effects the "Blocks" Modul at the left menu.
I am new to silverstripe and have build a midsize new website for a sports community. Now i would give access to the differents sports departments (authors) and now i am dealing with this problem many days.
I do not want to reorganise the whole website without content-blocks.
Please Help!
Regards
Such modules as this are vital for responsive frameworks and I am goinf to modily them for Foundation 4 grid elements and see if it gets too confusing for potential users. I am aslo evaluating https://github.com/burnbright/silverstripe-gridstructuredcontent at the same. This needs a json builder added to the mix,
Got everything working now! Thanks for the module!
In the Block>Settings tab there is a free form text field named "Link". What is the intended usage of this field? I entered a URL in hopes that it would link the image that I inserted, but the image only enlarges when clicked. I have got around this by adding the image into the "Main" tab, but was mostly curious if I'm using this correctly.
Is there a way to create more space between blocks? if so, which file do I modify?
Is there a way to add a colored border to blocks? I looked through block.css, but didn't see any reference to any color values. I looked at the ContentBlockModule.css file as well and do see references to color but wasn't sure if this was for CMS only or if it's just not applying.
Thanks in advance for your help regarding these questions. I have uploaded a picture of a page I made using your module. Keep in mind that I'm very much a Noob!
The module doesn't work with ss3.1.5. I can't create a new block due to the buttons (betterbuttons).
See https://github.com/dnadesign/silverstripe-elemental#limit-allowed-elements for a possible implementation. Makes sense IMHO
Hi NobrainerWeb,
Do you already have an add-on to add a twitterfeed in a block? If not, I'm gonna try to develop.
The user should be able to choose how the Image is cropped per block. Currently the cropping is hardcoded in the templates
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.