octobercms-plugins

octoberCMS | share the code between layouts

北战南征 提交于 2019-12-12 03:45:47
问题 On my default layout I have many AJAX handlers , but for my project, I need to create static pages with the same layout but with different variables (fields for client)... So as I understand I need to create different layout's that extends the partials from default layout ... But there are some way to share the code between the layouts to prevent repeating? Or, there are some way to create different variables on a layout to diferrent statics pages? Ex. of var. code: {variable name="tagline"

How to return the key value from a checkbox list field which automatically updates another field

╄→尐↘猪︶ㄣ 提交于 2019-12-11 17:58:37
问题 I would like it so that when one or more of the options in my checkboxlist has been ticked, the value of said option will then update the amount field. I'm sort of cheating as I'm using the key value to be the price of the field which I would then like to update the amount field with. This already works perfectly with the dropdown fields and this does calculate the amount field depending on what has been selected. As I've had to make the checkboxlist jasonable, the way in which this returns

OctoberCMS: how to set repeater widget autoload

可紊 提交于 2019-12-11 16:17:24
问题 can i set the repeater widget to auto load when the form open? it has max item property, can it auto load to max item number so user dont need to hit the prompt button re-updated this my fields.yaml fields: nowarta: label: 'No. Warta' oc.commentPosition: '' span: auto placeholder: 'format penulisan ''No. 34 Tahun XIX''' type: text tanggal: label: Tanggal oc.commentPosition: '' mode: date format: 'd - F - Y' span: right type: datepicker ignoreTimezone: false renungan: label: 'Renungan Mingguan

How do I provide output to console when seeding or migrating tables?

一个人想着一个人 提交于 2019-12-10 18:33:04
问题 I have a plugin in october and i'm creating the neccessary tables and seeding them per the docs. I wish to provide console output when doing that so I can debug the process i'm setting up and catching any eventualities. How can I output information to console when running php artisan october:up ? use Db; use Seeder; class SeedGeoStateTable extends Seeder { public function run() { foreach(array_merge(glob(__DIR__.'/seed/geo_state/*.txt'), glob(__DIR__.'/seed/geo_state/*.json')) as $file) {

Custom Contact Form in Partials and use in Static Pages plugin

这一生的挚爱 提交于 2019-12-08 13:31:18
问题 I have used OctoberCMS, Static Pages plugin, through which I am creating Static Pages. The thing is, I have created one contact form in Partial like below. contactform_snippet.htm - Markup contactform_snippet.htm - Code And below is the Static Page which I have created and used contactform_snippet.htm which I just created. And below is Preview how its looking like. The thing is, Even if I click on "Submit" button, it is not doing anything. I also changed the form code from data-request="{{ _

October CMS media finder

断了今生、忘了曾经 提交于 2019-12-08 09:07:11
问题 I have recently created a plugin (using the 'builder plugin') where I have a field for attaching images (using 'media finder widget'). Everything is working fine - I can upload an image or choose one from the media library. After successful saving, when I go back to the recently saved record, the image isn't shown... How can I fix this? Thanks! 回答1: 'media finder widget' not working with relation type 'file attachment', like this: public $attachOne = [ 'avatar' => 'System\Models\File' ]; try

OctoberCMS call another plugin's data in current plugin's dropdown

China☆狼群 提交于 2019-12-04 06:43:24
问题 I am new to OctoberCMS and i love the way it works. Currently i have created two plugins called as Products and Product Categories . I have created these plugins using Builder Plugin which is also a very good plugin to create another plugins with ease. Now the thing is, In my Products Categories plugin, i simply have a single field called as Product Category and user will add as many categories as he/she wants and this plugin works fine. And in my Products plugin, i have a field called as