Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hybrid Page #752

Closed
finchen opened this issue Dec 1, 2016 · 2 comments
Closed

Hybrid Page #752

finchen opened this issue Dec 1, 2016 · 2 comments

Comments

@finchen
Copy link

finchen commented Dec 1, 2016

Hi,

I am using Dynamic Page for a list of category.
the route:

category:
    path:     /category/{slug}
    defaults: 
        _controller: MyBundle:Category:index
        slug: all

with php bin/console sonata:page:update-core-routes --site=all

it will generate the route as a Dynamic Page in the database

Page.route_name = category
Page.url = /category/{slug}
Page.template = default

In most cases, this is enough:

  • I can choose a template and add blocks for the category pages (all the same)
  • I can set the page title and meta description from the controller for each category

Limitations:

  • I can not customize one category from the CMS (eg. add blocks for T-Shirt or let the CMS user change the title)
  • The drop down of Pages (eg. 'redirect' or 'parent' from the Page Admin) contains only the CMS page
  • If I build a 'menu builder' or a ck editor plugin to link to a page, the category pages don't really exist

Ideas:

  • when selecting a Dynamic Page should a second dropdown appear with the possible 'parameters' (eg. all the category)? it seems difficult to implement
  • should it use the CMF routing to generate all the pages and store them? (eg. for category. for 10000 products it might not be ideal)

Just looking for feedback first.
Thank you
(let me know if you would prefer to move it to stackoverflow)

@grimpows
Copy link

grimpows commented Dec 2, 2016 via email

@jordisala1991
Copy link
Member

I think that those ideas are too specific to be implemented directly on this bundle.

Closing for now, maybe this should be a question on stackoverflow on how to do it outside sonata.

If @sonata-project/contributors or you think that this should be implemented or have an idea on how to do it, please ping me to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants