knupska / static_section Goto Github PK
View Code? Open in Web Editor NEWStatic Sections simplify the process of editing field collections that should only exist once in Symphony.
Home Page: http://www.symphony-cms.com
Static Sections simplify the process of editing field collections that should only exist once in Symphony.
Home Page: http://www.symphony-cms.com
The Static Section field should not be selectable in the DS editor. This could be achieved by adding the following function to the field class:
/**
* Override 'include elements' (datasource edit page)
* do not include anything
*/
public function fetchIncludableElements()
{
return;
}
The extension does not create a ("dummy") table for the static section field. The missing table causes errors in the logs each time the datasource is called (no matter if the field is included in the datasource output).
I wouldn't mind having an empty table in the database. The logic simply is "each field has a table".
I'm using 2.2.1 and have Static Section installed.. havent been able to use it yet as everytime I enable it and attempt to amend the section to check the static section option I get this message on a local WAMP install:
Hi! I wrote an extension that adds button to the backend of Symphony. Since these buttons should not be displayed in a static section, it could be nice to use your method instead of the copy/paste I made..
The purpose of this is to permit you to modify your logic as when and how a section is declared static, while keeping other extensions from crashing if your logic changes.
What do you think ?
There's a superfluous space in line 40 of field.static_section.php
:
$this->_engine-> Database->query("DELETE FROM `tbl_fields_".$this->handle()."` WHERE `field_id` = '$id' LIMIT 1");
should be:
$this->_engine->Database->query("DELETE FROM `tbl_fields_".$this->handle()."` WHERE `field_id` = '$id' LIMIT 1");
I am finding strange warnings in the logs when using the static section extension:
2010/02/14 17:49:10 > WARNING: 2 - DOMDocument::loadHTML() [domdocument.loadhtml]: Tag recipient-groups invalid in Entity, line: 370 in file /Users/me/Sites/dev/me/email-newsletters/extensions/static_section/extension.driver.php on line 82
2010/02/14 17:03:09 > WARNING: 2 - DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: Tag group invalid in Entity, line: 1721 in file /var/www/www.meistro.de/extensions/static_section/extension.driver.php on line 82
2010/02/14 17:03:09 > WARNING: 2 - DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: Tag group invalid in Entity, line: 1721 in file /var/www/www.meistro.de/extensions/static_section/extension.driver.php on line 82
2010/02/14 17:03:09 > WARNING: 2 - DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID fields[-1][location] already defined in Entity, line: 1793 in file /var/www/www.meistro.de/extensions/static_section/extension.driver.php on line 82
2010/02/14 17:03:09 > WARNING: 2 - DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID fields[-1][location] already defined in Entity, line: 1825 in file /var/www/www.meistro.de/extensions/static_section/extension.driver.php on line 82
2010/02/14 17:03:09 > WARNING: 2 - DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID fields[-1][location] already defined in Entity, line: 2094 in file /var/www/www.meistro.de/extensions/static_section/extension.driver.php on line 82
2010/02/14 17:03:09 > WARNING: 2 - DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID fields[-1][location] already defined in Entity, line: 2362 in file /var/www/www.meistro.de/extensions/static_section/extension.driver.php on line 82
At the same time, the contents of textareas in the section editor are changed -- whitespace is stripped there. I double-checked that this whitespace issue disappears when I disable the Static Section extension. (I am using a custom field which has a texarea input for XML, saved to the database as text. Saving works fine, including whitespace.)
It does not make any difference if I make the section in question "static" or not.
Setup: Symphony 2.0.6 / Static Section 1.5
Would be handy so we don't have to clone the repo to download the extension.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.