Hello there,
i just noticed a strange behavior when whitespaces are in the param "block".
I personally never use whitespaces in that param since it should be more handled like a varname instead of a label (IMHO).
But other users might do that.
The CMSms core replaces whitespaces in the param "block" by underscores before saving the block in the database.
So when using this in the template:
{content block="some value with whitespaces"}
the content of that block will be stored in the content_props table with propname "some_value_with_whitespaces".
When showing the block in the frontend the {content} tag also replaces the whitespaces of the param "block" by underscores and then gets the content of that block. That means it looks for a content property named "some_value_with_whitespaces".
Also the {content_image} tag does.
Everything fine.
When creating the GBFilePicker module that supports the {content_module} tag i realised some issues of the core.
1st: All blocks that uses whitespaces in the param "block" are stored twice in the db.
One of propname with replaced whitespaces and correct content
and one of propname with witespaces but without content.
2nd: The {content_module} tag passes the param "block" without replacing whitespaces.
So modules will create input fields with name and id attributes that may contain whitespaces
what is not good. They need to replace the whitespaces again.
This is no big problem but just something that can be avoided.
3rd: The {content_module} tag does not replace the whitespaces in frontend anyway.
It trys to get a content property that is named exactly like it was entered in the param "block".
That means it searches for "some value with whitespaces".
But this cannot be found or an empty value is stored.
Solution atm is to never use whitespaces in param block.
To label your blocks use the param "label".
{content block="some value with whitespaces"} Problem
For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
{content block="some value with whitespaces"} Problem
Post by NaN »
Last edited by NaN on Fri Sep 10, 2010 2:12 pm, edited 1 time in total.
Jump to
- Official Boards
- ↳ README FIRST!!!
- ↳ Announcements
- ↳ General Discussion
- Support Boards
- ↳ CMSMS Core
- ↳ Modules/Add-Ons
- ↳ Help Wanted (commercial)
- ↳ Translations
- Community Boards
- ↳ Tips and Tricks
- ↳ CMS Show Off
- ↳ Layout and Design (CSS & HTML)
- ↳ Feature ideas
- ↳ Developers Discussion
- ↳ The Lounge
- International Discussions
- ↳ Czech/Slovak - Česky/Slovensky
- ↳ Danish - Dansk
- ↳ Dutch - Nederlands
- ↳ Aankondigingen
- ↳ Tips en Trucs
- ↳ Vertalingen & Documentatie
- ↳ Hulp gezocht (commercieel)
- ↳ Finnish - Suomi
- ↳ French - Français
- ↳ German - Deutsch
- ↳ BITTE ZUERST LESEN !!!
- ↳ Ankündigungen
- ↳ Installation und Einstellungen
- ↳ Module und Tags
- ↳ Smarty-Tipps und -Tricks
- ↳ Layout und Design
- ↳ Suchmaschinenoptimierung (SEO)
- ↳ HowTo's
- ↳ Übersetzungen
- ↳ Show Off
- ↳ Hilfe gesucht (kommerziell)
- ↳ Stammtisch
- ↳ Hungarian - Magyar
- ↳ Italian - Italiano
- ↳ Moduli/Plugins
- ↳ Lithuanian - Lietuviškai
- ↳ Darbo / bendradarbiavimo pasiūlymai ir paieška
- ↳ Persian / Farsi
- ↳ Polish - Polski
- ↳ Portuguese - Português
- ↳ Russian - русский
- ↳ Предложения и поиск РАБОТЫ
- ↳ Spanish - Español
- ↳ Swedish - Svenska
- Geekmoot Editions
- ↳ Geekmoot 2016
- ↳ Connections and Conversations
- ↳ Geekmoot 2015
- ↳ Geek Moot 2012
- ↳ Locked: Geek Moot 2010
- Old Forums
- ↳ [locked] CMSMS 2.0 Beta
- ↳ Module Developers
- ↳ Closed Issues
- ↳ [locked] Documentation0ld
- ↳ Suggestions, Modifications & Corrections
- ↳ [locked] CMSMS 1.11 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 1.10 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 2.2 Beta
- ↳ [locked] CMSMS MLE fork
- ↳ Modules/Addon patchs
- ↳ [locked] Quality Assurance
- ↳ [locked] Accessability and Usability
- ↳ [locked] Documentation
- ↳ Media and presentations about CMSMS
- ↳ [locked] Installation, Setup and Upgrade