22424 Posts in 6953 Topics by 2751 members
Page: 1 2
|Go to End||Next >|
16 May 2013 at 8:05am
i'm very new to silverstripe. but i already fell in love with it. the only thing that bothers me is the html-editor. i'm used to a modular page-content as seen in typo3, redaxo and contao.
for example a page in a redaxo-cms is like a folder and you fill it with different modules: headlines, text, wysiwyg, gallery, forms etc. at first it looks annoying, because most of the time all you need is a headline and some text and that's also possible with a html-editor. (anyway i prefer the modules, because with these i can restrict my user to a produce clean content, so no blinking text for them (i've already seen you can strip away functions from the html-editor in silverstripe))
but i can not imagine how to solve this example in a easy way with silverstripe:
there is a databse with some objects in it, and you want to embedd a list of particular objects (picture/text/number) in your text (<p>text</p><ul><li>obj 1 html</li><li>obj 2 html</li></ul><p>text</p>). multiple pages will refer to one object, if this object will change, you only have to change it once.
how do you solve this problem without content-modules?
is there a easy way to make the cms user choose from a list with objects, and not writing ids in the html-editor?
i've already thought about using silverstripe pages as container for other page-like objects with very minimal function (headline, text, gallery, objects), so the container page renders it's children, but this feels like a hack and i imagine a very ugly page-tree.
thanks a lot for your input!
16 May 2013 at 9:15am
You are looking for my new module: https://github.com/NobrainerWeb/Silverstripe-Section-Module - the module is for SS3.1
It lets you build your content in blocks/sections of content and each section have it's own template.
Creating new templates is as easy as allways in SilverStripe, and for more than templating, extend the Section dataobject (see the _Employee.ss example) and add more advanced functions like galleries and so on.
Let me know what you think
16 May 2013 at 9:47pm
this module sounds really interesting.
Is it possible that you make a short screencast to show how it works ?
17 May 2013 at 10:12pm
I will try to find some time for doing a screencast.
But using the module should be quite easy, install following the instructions and try to add some sections.
Try to switch between the default templates and see the result.
28 May 2013 at 6:42am
thanks a lot for your answer. yep, it looks like what i've searched for. first of all you seem to have a little error in your readme file:
Put this module under the root folder of site, named sectionmodule.
The module will copy sections/templates/SectionTemplates to themes/your_design/templates/SectionTemplates
i think the last one should be named sectionmodule instead of sections?!
I've just installed 3.1b3 (+simple theme), the dependencies and your module. what else do i have to do to see the additional fields of the employee template/module? or: where do i have to look for them?
if i want to add my own dataobjects, i have to create it in sectionmodule/code/dataobjects/ ?
@lx: i've added some screenshots
28 May 2013 at 9:33am
The _Employee.php file, contains a sample Dataobject so you can see how to extend on the section dataobject.
To use it, find the file sectionmodule/code/dataobjects/_Emplyee.php and rename the file to Employee.php and run dev/build?flush=1.
(the _ makes the file invisible to Silverstripe)
You shoul now be able to select between a section and a employee dataobject when creating a new record in the sections FieldList.
Use the Emloyee template to see the fields from Employee rendered in frontend.
28 May 2013 at 8:25pm
That module looks really interesting.
The module "page elements" did something similar for SS2.4 but i never got it running.
I would really love to jump right in but i have no SS project to do at the moment.
But i have a question.
There are a lot of templates available for each section.
But if i understand it right, all sections of a page are rendered one after another in a loop.
I think it would be more flexible, to add a "Position" property to each section.
In your page class you could for example define which positions exist in this page. (Or even better , if the module would parse the template file of this page, e.g. HomePage.ss and find all data-pos="left" , data-pos="sidebar".
Then with each section you have a dropdown and choose in which position you want this section to be rendered.
Of course the postion of each element should be listet in the grid.
Very cool, that you made this module.
This was really a missing puzzle in SS.
@bepe: thanks for the screenshots
1 June 2013 at 6:06am
Thank you for your comment.
I actually have something about making more placeholders per page in my todo list on Github.
I'm not sure i like the idea of mixing them together in one GridField though - perhaps better to have a GridField for each placeholder, and have the option to move a section from one "placeholder/sectionarea" to another. It should be very simple to do. To me
About the SectionTemplates - yes the module includes alot of them, but they are really just example files. People really should do their own or atleast delete the unwanted ones from the folder.
Page: 1 2
|Go to Top||Next >|