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

Set Skin and other options parameter #201

Open
sergiotropea opened this issue Nov 17, 2017 · 5 comments
Open

Set Skin and other options parameter #201

sergiotropea opened this issue Nov 17, 2017 · 5 comments

Comments

@sergiotropea
Copy link

I try to set skin (skin-black-light) like documentation. But configuration parameters are ignored. So i resolve in this way, according to
/vendor/avanzu/admin-theme-bundle/DependencyInjection/Configuration.php

#config.yml avanzu_admin_theme: options: skin: '%admin_skin%' # see skin listing for viable options
and in my parameters.yml:

admin_skill: skin-balck-light

Is my error or have to change documentation?

Debug info

Component Version
Symfony version 3.3
AdminThemeBundle dev-master
@shakaran
Copy link
Collaborator

@nievox it seems that you have written "admin_skill" not "admin_skin".

Could you paste your twig template using the option and your config.yml?

@sergiotropea
Copy link
Author

Thanks for your answer and congratulation for this project.

This is my confg.yml file:

imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: services.yml }

parameters:
    locale: it

framework:
    #esi: ~
    translator: { fallbacks: ['%locale%'] }
    secret: '%secret%'
    router:
        resource: '%kernel.project_dir%/app/config/routing.yml'
        strict_requirements: ~
    form: ~
    csrf_protection: ~
    validation: { enable_annotations: true }
    #serializer: { enable_annotations: true }
    templating:
        engines: ['twig']
    default_locale: '%locale%'
    trusted_hosts: ~
    session:
        # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
        handler_id: session.handler.native_file
        save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
    fragments: ~
    http_method_override: true
    assets: ~
    php_errors:
        log: true

twig:
    debug: '%kernel.debug%'
    strict_variables: '%kernel.debug%'
    globals:
        admin_skin: '%admin_skin%'

doctrine:
    dbal:
        driver: pdo_mysql
        host: '%database_host%'
        port: '%database_port%'
        dbname: '%database_name%'
        user: '%database_user%'
        password: '%database_password%'
        charset: UTF8
        # if using pdo_sqlite as your database driver:
        #   1. add the path in parameters.yml
        #     e.g. database_path: '%kernel.project_dir%/var/data/data.sqlite'
        #   2. Uncomment database_path in parameters.yml.dist
        #   3. Uncomment next line:
        #path: '%database_path%'

    orm:
        auto_generate_proxy_classes: '%kernel.debug%'
        naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_mapping: true

swiftmailer:
    transport: '%mailer_transport%'
    host: '%mailer_host%'
    username: '%mailer_user%'
    password: '%mailer_password%'
    spool: { type: memory }

fos_user:
    db_driver: orm # other valid values are 'mongodb' and 'couchdb'
    firewall_name: main
    user_class: AppBundle\Entity\User
    from_email:
        address: "%mailer_user%"
        sender_name: "%mailer_user%"
    registration:
        confirmation:
            from_email: # Use this node only if you don't want the global email address for the confirmation email
                address:        '[email protected]'
                sender_name:    'CMS Multibrand Seller'
            enabled:    true # change to false for not required email confirmation
            template:   FOSUserBundle:Registration:email.txt.twig

avanzu_admin_theme:
    options:
        default_avatar: theme/dist/img/avatar.png
        skin: '%admin_skin%'  # see skin listing for viable options
        fixed_layout: false      # -------------------------------------------------------
        boxed_layout: false      # these settings relate directly to the "Layout Options"
        collapsed_sidebar: false      # described in the adminlte documentation
        mini_sidebar: false      # -------------------------------------------------------
        control_sidebar: true      # controls whether the right hand panel will be rendered
        widget:
            collapsible: false
            removable: false
            solid: true
            use_footer: false

And, for example. this is a base.html.twig i my project:

{% extends 'AvanzuAdminThemeBundle:layout:default-layout.html.twig' %}

    {% block avanzu_document_title %}Scaletta CMS{% endblock %}

    {% block avanzu_head %}
        <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
        <link rel="stylesheet" href="{{ asset('assets/css/style.css') }}" />
    {% endblock %}

    {% block avanzu_logo_mini %}<b>C</b>MS{% endblock %}
    {% block avanzu_logo_lg %}<img src="{{ asset('assets/images/logo-h.png') }}">{% endblock %}

I hope that is helpful for the project.

@shakaran
Copy link
Collaborator

If you use '%admin_skin%' then it is a parameter, and you should define under parameters section:

parameters:
    locale: it
    admin_skin: skin-black-light

@sergiotropea
Copy link
Author

sergiotropea commented Nov 17, 2017

Yes, i done, you can see my first comment... with copy error skill <-> skin :)

@pabloveintimilla
Copy link
Contributor

@nievox please chek my PR #209. You need change the configuration structure.

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

No branches or pull requests

3 participants