If you were using version v1.x and either used the default template or a custom template, please read the following steps necessary to upgrade or change to the new templates. If you are a new user (i.e., if this is a new install), refer to the above guide.
All template and CSS files have been moved to the folder wec_discussion/template/. To ensure access to the new template system, TypoScript (TS) has been written into the template’s constants for both the template and CSS files:
plugin_tx_wecdiscussion_pi1.templateFile = EXT:wec_discussion/template/wecdiscussion.tmpl
plugin_tx_wecdiscussion_pi1.baseCSSFile = EXT:wec_discussion/template/pluginstyles.css
plugin_tx_wecdiscussion_pi1.cssFile = EXT:wec_discussion/template/wecdiscussion.css
The pluginstyles.css file is used as the CSS foundation for most WEC plugins using new templates. This allows custom styling across many WEC plugins for the site's template. It also simplifies and compacts the CSS when multiple WEC plugins are installed. In addition, if the wec_styles plugin is installed, it accesses the pluginstyles.css from wec_styles first. This ensures improvements in pluginstyles.css are incorporated site-wide. Otherwise, if wec_styles is not installed, then it uses the pluginstyles.css from this plugin.
If you have an old custom template, you will need to upgrade it. You can choose to either upgrade using the old templating system or using the new templating system. Upgrading to the new system is work-intensive, but offers a significant improvement in the look. We suggest referring to the new template at: wec_discussion/template/wecdiscussion.tmpl and the new CSS in wec_discussion/template/wecdiscussion.css.
If you choose to remain with the older system, you can find the template files at wecdiscussion-old.tmpl and the CSS file at wec_discussion/static/ts/setup.txt.
To upgrade using the old templating system, the main issues you will likely encounter will be:
The handling of buttons have changed. If you examine the button code you will see that your current buttons will not work right.
Everything is more semantic HTML. For instance, list views use <ul><li> instead of multiple <div> tags.
Each section is appropriately called using a consistent naming convention (plugin[*]), e.g., pluginNav, pluginHeader, pluginFooter, pluginSection, pluginAside. We have used HTML5 tags as the base for class names when possible.
To upgrade to the new template system, we strongly suggest using the new template as a foundation and adding CSS or objects to the template as desired. The CSS and HTML structure of the template has changed so significantly that we advise starting from scratch rather than trying to change an existing template.
If you want to use the new default template and have installed v1.x, use the TYPO3 Template tool and access the page where the +ext template for the WEC Discussion Template is included (generally on the same page as the WEC Discussion plugin). Click the template's edit icon and select the Includes tab. In the Include Static field, delete the WEC Discussion (old) Template (older templates were renamed for easy identification). Next, add the WEC Discussion Template. Save the template record and clear the caches (the lightning bolt icon at the top right of the TYPO3 toolbar). Test each page that has a WEC Discussion installation. Once you've included the new template, modify the look by accessing the Plugin's Display tab.
To create a custom template, we recommend beginning with the wecdiscussion.tmpl and wecdiscussion.css files as models. To change the look of an entry, use one of the wecentry[1-3].css files in the folder wec_discussion/template as a model.
Once you've made your changes, go to the +ext template and in the SETUP section (or you can use the Constant Editor), you can set the plugin_tx_wecdiscussion_pi1.cssFile to the location of the new css file, and plugin_tx_wecdiscussion_pi1.templateFile to the location of the new template file. The WEC_Discussion extension will then use your new template and/or CSS.