Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

added docs on the slideshow block #104

Merged
merged 11 commits into from
May 30, 2013
Merged

added docs on the slideshow block #104

merged 11 commits into from
May 30, 2013

Conversation

elHornair
Copy link
Member

@dbu wanna have a look and merge?

@@ -218,6 +218,9 @@ Also the BlockBundle has more specific blocks:
* RssBlock: This block extends the ActionBlock: the block document saves the feed url and the controller action fetches
the feed items. The default implementation uses the `EkoFeedBundle <https://github.com/eko/FeedBundle>`_ to read the
feed items.
* SlideshowBlock / SlideshowItemBlock: Blocks for helping the management of Slideshows in the Backend. Note that this
block doesn't the logic to make the slideshow work in the frontend - Feel free to use your favourite JS library to do
this.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..."block does not provide any javascript to make"... ?

Since the BlockBundle doesn't contain anything to make the slideshow work in the frontend, you need to do this
yourself. Just override 'block_slideshow.html.twig' and 'block_slideshow_item.html.twig' and use your favourite JS
library to do make the slideshow interactive.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't necessarily need to overwrite the templates, or do we? if the default template is good enough, just adding the javascript would be enough, no? alright, if the user does not want the js globally, he would have to extend the block_slideshow.html.twig to append the js bootstrap code to trigger the slideshow. but the item template should not need to be changed, or does it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how complicated does the code look for the YUI slideshow loader? could we add an example?

@elHornair
Copy link
Member Author

@dbu adapted the section about the template to make it clear that it is not necessarily to be overridden.

@elHornair
Copy link
Member Author

@dbu I'm not sure if we should add JS Code to the docs here. We can't know what the user is going to use...

@dbu
Copy link
Member

dbu commented Mar 12, 2013

@elHornair i think a short YUI and a short jquery example could well illustrate this for people with not so much js-power. its just examples, not part of any default template.

can be merged once symfony-cmf/block-bundle#32 is ready.


The SlideshowBlock is just a special kind of ContainerBlock, a container for the slides of a slideshow. The BlockBundle
also comes with a SlideshowItemBlock which represents a very simple kind of slides: A SlideshowItem just contains an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in general we always put ClassNames in double back ticks.
Also, one of:

  • "a very simple kind of slide; a SlideshowItem..." (slide is singlular with a semi colon)
  • "a very simple kind of slide, a SlideshowItem, which contains an image and a label."

and

".. you want as an item for a Slideshow, you can also mix .." (i.e. comma not full stop)

@dbu
Copy link
Member

dbu commented Mar 15, 2013

we merged symfony-cmf/block-bundle#32 now, but we did refactor some names so this needs again some cleanup. will try to do that today and then merge.

@lsmith77
Copy link
Member

lsmith77 commented Apr 3, 2013

ping


SlideshowBlock
--------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know CMF's doc standards, but I think it's better to make the heading line as long as the heading title.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

service to use in that case is ``symfony_cmf_block.slideshow_admin``.
Please refer to `the Sonata Admin docs <http://sonata-project.org/bundles/admin/master/doc/reference/form_types.html>`_
for further information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elHornair is this still true about the embedding? or should we rather refer to the tree thing here? if i understood correctly embedding two levels did not work properly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, that's right. But I'm afraid there's not much we can do about that here, since this seems to be a problem of Sonata. Wdyt, should we maybe add a note about that here?

@dbu
Copy link
Member

dbu commented Apr 6, 2013

this should now be good to merge except for the question about the admin embedding.

@lsmith77
Copy link
Member

ping

Conflicts:
	bundles/block.rst
	bundles/block/types.rst
data_loader: phpcr
quality: 85
filters:
thumbnail: { size: [616, 419], mode: outbound }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the yml config is copied from a project of us and is working there

@dbu
Copy link
Member

dbu commented May 27, 2013

merged master and updated. there is a bit of an issue with the xml and php config example for LiipImagineBundle /cc @lsmith77

liip_imagine:
...
filter_sets:
symfony_cmf_block:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dantleech what did you do with the name of the default filter? its a name for the imagine filter, not a config element. does it still need to change to cmf_block instead?

@lsmith77
Copy link
Member

@havvg is the main maintainer if that bundle. then again I doubt h that he uses XML for bundle config either.


Creating a slideshow consists of creating the container SlideshowBlock and
adding blocks to it. Those blocks can be anything, but an image makes a lot
of sense.::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use either a dot or a double colon

@dbu
Copy link
Member

dbu commented May 28, 2013

switched to the correct default namespace. i would assume people using xml config will read on LiipImagineBundle and figure out the correct namespace if this is ever cleaned up. ready to merge?

'thumbnail' => array(
'size' => array(616, 419),
'mode' => 'outbound',
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing comma here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed this as well and squashed all the tweaks into one commit.

dbu added a commit that referenced this pull request May 30, 2013
added docs on the slideshow block
@dbu dbu merged commit f639974 into master May 30, 2013
@dbu dbu deleted the slideshow_docs branch May 30, 2013 06:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants