Fully implement Twig templating layer #1753

Closed
craigh opened this Issue Jun 12, 2014 · 15 comments

Projects

None yet

4 participants

@craigh
Member
craigh commented Jun 12, 2014 edited

Fully implement Twig templating layer

  • provide required additional template functions
  • theming concept and prototype
  • convert system modules
  • convert themes
    • Andreas08
    • Atom
    • Bootstrap
    • Printer
    • RSS
    • SeaBreeze
  • overall review and bugfixing
@craigh craigh added this to the 1.5.0 milestone Jun 12, 2014
@craigh craigh changed the title from Fully implement Twig tempting layer to Fully implement Twig templating layer Jun 12, 2014
@craigh
Member
craigh commented Oct 27, 2014

This may need to be bumped all the way to 2.0.0 because as far as I can tell, it will be very difficult to provide a forward compatibility layer where some site extensions use Twig and others use Smarty. I think it will need to be all or nothing and that is a serious BC break. perhaps I do not understand and there is a way to make it work, but in the limited investigation I have made, I can't see it.

@craigh
Member
craigh commented Nov 19, 2014
@craigh
Member
craigh commented Dec 17, 2014

My comment from Oct 27 is wrong. I am currently utilizing Twig templates in conjunction with Smarty templates. you have to force the 'legacy mode' to engage.

you can see the controller here: https://github.com/craigh/BreakIt/blob/master/Controller/NewController.php

Forms also work. I am testing something right now that I will push to BreakIt asap (only as a demo - it doesn't break anything on purpose). So, IMO, the only real issue left is theming and I'm not sure how to solve that at the moment.

@Guite
Member
Guite commented Dec 18, 2014

Added a task list to this task above.

@Kaik
Contributor
Kaik commented Dec 18, 2014

@craigh I have played with sf2 and twig before, actually it was looking similar to what you have in breakeIt module, and I have stopped on translations they worked only for zikula domain (inside twig template) while there was no translation using module domain. Module tranlsations are working correctly when using smarty. I wonder if you had any experiences with it.

@craigh
Member
craigh commented Dec 18, 2014

@Kaik it may depend on if you mean in the controller or the twig template.

@Kaik
Contributor
Kaik commented Dec 18, 2014

Actually I have checked in controller, form builder and in template but that was few months ago and things may have changed since then. I will try to check it all again to see how it is acting now, hopefully I will be able to do all zk things before new year.

@craigh
Member
craigh commented Dec 19, 2014

I doubt the behavior has changed much, since I think I'm the only one working on it atm and I don't even know where to start ๐Ÿ˜‰

@craigh
Member
craigh commented Dec 19, 2014

There is this: https://github.com/zikula/core/blob/1.4/src/lib/Zikula/Bundle/CoreBundle/Twig/Extension/GettextExtension.php

which I suppose should work but there are some undefined functions there which is confusing.

@Kaik
Contributor
Kaik commented Dec 19, 2014

Now I remember I was trying to fix some of twig related stuff in the other file in same folder CoreExtensions.php Most probably I have looked at GettextExtension.php but for me it looked fine... now I see I have missed that @ todo bit and looks like this is exactly what is missing. I have still one doubt about this because I have tried to pass domain directly and it did not work either but might be that I messed something.

@craigh
Member
craigh commented Dec 19, 2014

@Kaik can you give me some idea how to begin working on the problem? I never use anything but English so I'm pretty dumb about the translation system in general (in other words, start from the beginning)

@Guite Guite modified the milestone: 1.5.0, 2.0.0 Dec 22, 2014
@Guite Guite added the Blocker label Dec 22, 2014
@craigh
Member
craigh commented Dec 24, 2014

here is another blog about how they solved their theme problem http://hugogiraudel.com/2013/11/12/themes-layouts-twig/

@matheo
Member
matheo commented Dec 24, 2014

Nice material Craig! I will share some thoughts on this topic later because
this is my passion :)

@craigh craigh added a commit that referenced this issue Jan 29, 2016
@craigh craigh Update BlockHandlerInterface to require symfony forms for editing. cc/ โ€ฆ
โ€ฆ@cmfcmf

| Q                 | A
| ----------------- | ---
| Bug fix?          | no
| New feature?      | no
| BC breaks?        | no
| Deprecations?     | no
| Fixed tickets     | -
| Refs tickets      | #2675, #2676, #2677, #1753
| License           | MIT
| Changelog updated | no
89aa14e
@craigh craigh added a commit that referenced this issue Feb 10, 2016
@craigh craigh Refactor ThemeModule to Core-2.0 Spec
| Q                 | A
| ----------------- | ---
| Bug fix?          | yes
| New feature?      | yes
| BC breaks?        | no
| Deprecations?     | yes
| Tests pass?       | n/a
| Fixed tickets     | #2671
| Refs tickets      | #1753
| License           | MIT
| Changelog updated | yes

also update /docs structure for improved understanding.
Implemented system of activating/deactivating themes. should close #2671.
Also moved most Theme related classes/files from Core to ThemeModule.
c5f60d2
@craigh craigh added a commit that referenced this issue Mar 2, 2016
@craigh craigh Refactor ExtensionsModule to Core-2.0 (except Plugin handling).
| Q                 | A
| ----------------- | ---
| Bug fix?          | yes
| New feature?      | yes
| BC breaks?        | no
| Deprecations?     | yes
| Tests pass?       | yes
| Fixed tickets     | #2600
| Refs tickets      | #1753
| License           | MIT
| Doc PR            | -
| Changelog updated | yes

 - Upgrade ExtensionsModule to Core-2.0 spec except the handling of module and system plugins.
 - Consolidate all hook-related classes and files into new HookBundle
 - Correct issue with hook display requiring smarty - fixes #2600
 - Add 'info' type of flash message
826cadd
@craigh craigh added a commit that referenced this issue Mar 2, 2016
@craigh craigh Refactor ExtensionsModule to Core-2.0 (except Plugin handling).
| Q                 | A
| ----------------- | ---
| Bug fix?          | yes
| New feature?      | yes
| BC breaks?        | no
| Deprecations?     | yes
| Tests pass?       | yes
| Fixed tickets     | #2600
| Refs tickets      | #1753
| License           | MIT
| Doc PR            | -
| Changelog updated | yes

 - Upgrade ExtensionsModule to Core-2.0 spec except the handling of module and system plugins.
 - Consolidate all hook-related classes and files into new HookBundle
 - Correct issue with hook display requiring smarty - fixes #2600
 - Add 'info' type of flash message
be90357
@craigh craigh added a commit that referenced this issue Mar 2, 2016
@craigh craigh Refactor ExtensionsModule to Core-2.0 (except Plugin handling).
| Q                 | A
| ----------------- | ---
| Bug fix?          | yes
| New feature?      | yes
| BC breaks?        | no
| Deprecations?     | yes
| Tests pass?       | yes
| Fixed tickets     | #2600
| Refs tickets      | #1753
| License           | MIT
| Doc PR            | -
| Changelog updated | yes

 - Upgrade ExtensionsModule to Core-2.0 spec except the handling of module and system plugins.
 - Consolidate all hook-related classes and files into new HookBundle
 - Correct issue with hook display requiring smarty - fixes #2600
 - Add 'info' type of flash message
26f0d2e
@craigh craigh added a commit that referenced this issue Mar 28, 2016
@craigh craigh refactor Settings module to Core-2.0 spec.
| Q                 | A
| ----------------- | ---
| Bug fix?          | no
| New feature?      | no
| BC breaks?        | no
| Deprecations?     | no
| Fixed tickets     | -
| Refs tickets      | #2034, #1753
| License           | MIT
| Changelog updated | yes
038b900
@Guite Guite added a commit that referenced this issue Apr 25, 2016
@Guite Guite refactored pagelock module to 2.0 style (#2862)
* refactored pagelock module to 2.0 style

* typo

* added missing service argument

* several improvements

* minor fixes

* several amendments

* rename method

* typo

* minor fix for composer.json

* minor docblock fix

* minor amendments

* minor cleanup regarding Multisites

* Fixed StyleCI issue

* update composer.lock updates

 - paragonie/random_compat (v1.2.2 => v1.4.1)
 - ezyang/htmlpurifier dev-master (92aabf2 => 25db9e1)
 - abeautifulsite/jquery-minicolors dev-master (8039c59 => 543116f)

* Rename setasdefault.html.twig to setAsDefault.html.twig

* Rename viewmodulelist.html.twig to viewModuleList.html.twig

* Rename moduleservices.html.twig to moduleServices.html.twig

* Revert changes in admin api

* updated clickjacking protection listener

* use array shorthand syntax, added some missing docblocks

* fixed regression

* correct string translation. refs cmfcmf/MediaModule#64

* use non-aliased service name. refs #2808 @Guite

* use array shorthand syntax, added some missing docblocks (reverted from commit 93f6a61)

* corrected method call of variable api, fixed #2812

* disable dependency check for vendors in modules.

* disable dependency check for vendors in modules.

* Don't use PHP_VERSION constant

* Removed {break} Smarty tag

* Fix output of theme maincontent to NOT automatically include a unique div wrapper. Move wrapper to AbstractTheme.

| Q                 | A
| ----------------- | ---
| Bug fix?          | no
| New feature?      | no
| BC breaks?        | no
| Deprecations?     | no
| Fixed tickets     | -
| Refs tickets      | #2819
| License           | MIT
| Changelog updated | no

* Added issue and pull request tempaltes, closes #2778.

* update composer.json to include robloach/component-install as an explicit dependency. update composer.lock

* update method for php strict standards

* Remove dev-master for two dependencies.

* Added Vagrant support.

* correct typehint in ZikulaPhpFileExtractor

* | Q                 | A
| ----------------- | ---
| Bug fix?          | no
| New feature?      | no
| BC breaks?        | no
| Deprecations?     | no
| Tests pass?       | yes
| Fixed tickets     | #2823
| Refs tickets      | -
| License           | MIT
| Doc PR            | -
| Changelog updated | no

* minor correction to Categories Form Type

* correct display of developer notice in Admin panel for new admin header. fixes #2828

* grduingly provide backward compatible installer for 'transition' modules. fixes #2831

* Make Bootstrap theme site default.

| Q                 | A
| ----------------- | ---
| Bug fix?          | yes
| New feature?      | yes
| BC breaks?        | no
| Deprecations?     | no
| Fixed tickets     | -
| Refs tickets      | -
| License           | MIT
| Changelog updated | yes

## Description
Make Bootstrap theme site default (new features added, blocks and permissions adjusted specific to theme). Improved compatibility of zikula-specific bootstrap overrides with respect to navbars. Provide method for customizing Bootstrap path in Core-2.0 themes

## Todos
- [x] Tests
- [x] Documentation
- [x] Changelog

* update composer.lock

* Create Theme permission at installation.
Include selected theme in permission check.

* update composer.lock cc/ @Guite

* Updated Symfony version

* update Core version to 1.4.3

* update changelog for 1.4.3

* refactor Settings module to Core-2.0 spec.

| Q                 | A
| ----------------- | ---
| Bug fix?          | no
| New feature?      | no
| BC breaks?        | no
| Deprecations?     | no
| Fixed tickets     | -
| Refs tickets      | #2034, #1753
| License           | MIT
| Changelog updated | yes

* additional features to bootstrap topnav login button to allow improved access to user-related functions.

* minor css fix to bootstrap theme topnav login block

* update composer.lock

  - Removing nikic/php-parser (v1.4.1)
  - Installing nikic/php-parser (v2.0.1)

  - Removing jms/translation-bundle (1.2.1)
  - Installing jms/translation-bundle (1.2.2)

  - Removing monolog/monolog (1.18.1)
  - Installing monolog/monolog (1.18.2)

  - Updating ezyang/htmlpurifier dev-master (096064d => 2e15d7a)
    Checking out 2e15d7a4dadb08ccdac3f060dcf81112e607b6c4

* fix error on creation of new ExtendedMenublock

* fix StyleCi error

* update composer.lock. force 1.4 branch of php-parser

  - Removing composer/installers (v1.0.23)
  - Installing composer/installers (v1.0.24)

  - Removing nikic/php-parser (v2.0.1)
  - Installing nikic/php-parser (v1.4.1)

* Form improvements (#2846)

* update form extensions to Sy2.8 and add a few features @Guite ๐Ÿ˜„

* update changelog

* support multiple help elements (#2847)

* support multiple help elements

* Check for empty help values

* Adjust form theme template to use macros to avoid duplicate code. Add alert text feature. @Guite

* Added information about using help arrays

* correct upgrade of 'hybrid' 1.4/2.0 modules

* allow alerts on checkboxes also.

* refactored pagelock module to 2.0 style

* typo

* added missing service argument

* several improvements

* minor fixes

* several amendments

* rename method

* typo

* minor fix for composer.json

* minor docblock fix

* minor amendments
18d2746
@Guite Guite modified the milestone: 1.4.3, 2.0.0-beta1 Jul 14, 2016
@Guite
Member
Guite commented Jul 14, 2016

Closed ๐Ÿ˜„

@Guite Guite closed this Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment