Drop Down

Permalink Browser Info Environment
Hi there,

love this add on.

What purpose has the drop down in this block-designer? How can it be of use in a block?

For example I would love to be able to use the drop down to choose a style so that a block can be used with multiple designs just to choose from a class.

Thanks in advance.

Type: Pre-Sale
Status: Resolved
3CGroup
View Replies:
ramonleenders replied on at Permalink Reply
ramonleenders
Hi there,

I guess you mean the "select" field type? If so:
When you take a look in the view file, you see the options you entered in a PHP switch. You can enter your code here. If you like different styling/setup of the rest of the view file, copy/paste everything except this switch into the cases of this switch. In each case there is a comment of code which says "// ENTER MARKUP HERE FOR FIELD "Your field name" : CHOICE "Your choice"". See the code below:

<?php switch ($cmsVersion) {
    case "concrete5_old":
        // ENTER MARKUP HERE FOR FIELD "CMS Version" : CHOICE "Concrete5 CMS 5.6"
        break;
    case "concrete5":
        // ENTER MARKUP HERE FOR FIELD "CMS Version" : CHOICE "Concrete5 CMS 5.7"
        break;
    case "concrete5_future":
        // ENTER MARKUP HERE FOR FIELD "CMS Version" : CHOICE "Concrete5 CMS 5.313"
        break;
} ?>


You can also do if/else cases of course, but that totally depends on what you'd need! I'm not sure how experience you are with PHP or coding at all, but this is more of a coding field.

Does that explain it for you? If not, let me know about any questions you still have!

Kind regards,

Ramon
ramonleenders replied on at Permalink Reply
ramonleenders
Added some extra options to the "select" field type to output in the view either:

- the PHP switch, where you can build your PHP code yourself;
- the KEY of the selected value;
- the value itself;

The PHP switch is the one in the message above, the value can be "Concrete5 CMS 5.6" and the key can be "concrete5_old" (a choice had been entered as "concrete5_old :: Concrete5 CMS 5.6" in this example).

Kind regards,

Ramon

concrete5 Environment Information

# concrete5 Version
Core Version - 5.7.4.2
Version Installed - 5.7.4.2
Database Version - 20150504000000

# concrete5 Packages
Anitya Theme (1.1), Block Designer (1.1.0), File List Pro (1.0.1).

# concrete5 Overrides
blocks/sliding_panel/view.php, blocks/sliding_panel/config.json, blocks/sliding_panel/icon.png, blocks/sliding_panel/edit.php, blocks/sliding_panel/db.xml, blocks/sliding_panel/add.php, blocks/sliding_panel/controller.php, blocks/sliding_panel/form.php, blocks/sliding_panel, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/sl_SI/LC_MESSAGES/messages.mo, languages/sl_SI/LC_MESSAGES, languages/sl_SI, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, blocks/sliding_panel/view.php, blocks/sliding_panel/config.json, blocks/sliding_panel/icon.png, blocks/sliding_panel/edit.php, blocks/sliding_panel/db.xml, blocks/sliding_panel/add.php, blocks/sliding_panel/controller.php, blocks/sliding_panel/form.php, blocks/sliding_panel, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/sl_SI/LC_MESSAGES/messages.mo, languages/sl_SI/LC_MESSAGES, languages/sl_SI, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.2.16 (Debian)

# Server API
apache2handler

# PHP Version
5.3.8-1~dotdeb.2

# PHP Extensions
apache2handler, apc, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, ereg, exif, ffmpeg, fileinfo, filter, ftp, gd, gettext, gmp, hash, http, iconv, idn, imagick, imap, interbase, ionCube Loader, json, ldap, libxml, mailparse, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, odbc, openssl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, posix, pspell, recode, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, SQLite, sqlite3, standard, suhosin, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uuid, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
max_execution_time - 30
apc.max_file_size - 1M
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
memory_limit - 128M
post_max_size - 8M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 2M
http.persistent.handles.limit - -1
ibase.max_links - Unlimited
ibase.max_persistent - Unlimited
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
suhosin.cookie.max_array_depth - 50
suhosin.cookie.max_array_index_length - 64
suhosin.cookie.max_name_length - 64
suhosin.cookie.max_totalname_length - 256
suhosin.cookie.max_value_length - 10000
suhosin.cookie.max_vars - 100
suhosin.executor.include.max_traversal - 0
suhosin.executor.max_depth - 0
suhosin.get.max_array_depth - 50
suhosin.get.max_array_index_length - 64
suhosin.get.max_name_length - 64
suhosin.get.max_totalname_length - 256
suhosin.get.max_value_length - 512
suhosin.get.max_vars - 100
suhosin.log.phpscript.is_safe - Off
suhosin.memory_limit - 0
suhosin.post.max_array_depth - 50
suhosin.post.max_array_index_length - 64
suhosin.post.max_name_length - 64
suhosin.post.max_totalname_length - 256
suhosin.post.max_value_length - 1000000
suhosin.post.max_vars - 1000
suhosin.request.max_array_depth - 50
suhosin.request.max_array_index_length - 64
suhosin.request.max_totalname_length - 256
suhosin.request.max_value_length - 1000000
suhosin.request.max_varname_length - 64
suhosin.request.max_vars - 1000
suhosin.session.max_id_length - 128
suhosin.upload.max_uploads - 25

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/7.1.6 Safari/537.85.15

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.