Jump to content

dewwwald

Members
  • Posts

    28
  • Joined

  • Last visited

About dewwwald

  • Birthday 08/28/1992

Profile Information

  • Gender
    Male
  • Location
    South-Africa

Recent Profile Visitors

1,772 profile views

dewwwald's Achievements

Jr. Member

Jr. Member (3/6)

14

Reputation

1

Community Answers

  1. Ill do that, however I am now going to use a fix that works just the same, $form_post_two->required = $input->post->has_post === 'yes' ? 0 : 1;
  2. So I rendered the form now, using the form->render function. However this does not seem to work. That brings me to my selector. Tries -> - "has_post='no'" - "has_post_no=1" - "has_post.value='no'"
  3. Hey LostKobrakai, Thanks for the reply, Yeah I tested the value strait away after I posted the question. I am rendering the markup myself using a full MVC approach. Could this cause the issue? Here is an example of what I am rendering <div class="Inputfield push_-large_-bottom " id="wrap_post_line_one"> <label for="post_line_one"><!-- -->Postal address line 1 </label> <input type="text" name="post_line_one" id="post_line_one" placeholder="" maxlength="2048" value=""> </div> I want post line one to be requiredIf. Is processwire only looking at the field id in input->post? Because then this should work as all of the forms work perfectly. The issue i guess lies in the setup of requiredIf on my side, here is post_line_one's setup, // create an input for a visitor's Postal address $form_post_one = $modules->get("InputfieldText"); $form_post_one->attr('label', "Postal address line 1"); $form_post_one->requiredIf = "has_post.value='no'"; $form_post_one->attr('id+name','post_line_one'); $form_post_one->attr('placeholder',''); $form_post_one->attr('grid','g-1/1'); $this->append($form_post_one); //this is where my mvc starts
  4. Hey Simple From Support, I am looking at having a field requiredIf radio = yes. Must the field be set up as follow $condition_field->attr('id', 'condition_field_id'); $field->requiredIf="condition_field_id='yes'"; I'll be handling the visual stuff on the front end with custon js. But before I do that the back end must work. The back end is basically processing input with the form. Will it catch that this field has now become required? and therefore render it as a required field?
  5. Make CKEditor use absolute paths. Solved: I created a copy of the wire/modules/Inputfield/InputfieldCKEditor/pwlink plugin and named it site/modules/InputfieldCKEditor/pwlink, then I enabled it instead of pwlink. added a function to CKEDITOR inside of newMod/plugin.js : CKEDITOR.absoluteLink = function (href) { var reg = /^https?:\/\//i; if (!reg.test(href)) { var link = document.createElement("a"); link.href = href; if (href.indexOf(link.host) > -1) { //ie subdomain src = link.protocol+"/"+link.pathname+link.search+link.hash; } else { src = link.protocol+"//"+link.host+link.pathname+link.search+link.hash; } return src; } return href; } Then I went ahead and passed the link into the function: var url = CKEDITOR.absoluteLink($("#link_page_url", $i).val());
  6. Hi guys. I am looking for a way to use the multi-site plugin along with this. The issue I encountered is, when I navigate to a sub domain the link, since it is relative points to the subdomain path, even when the page being referenced is on the naked domain. Can I configure the CKEditor to use absolute paths?
  7. BernhardB, I am not sure what wireshell does yet, however looking at it quickly it seem to be an interface to processwire admin through the terminal. I would not sucgest that a node module will ever be replaced by a php shell plugin (even though its my first run in with this), however I would say that the two can rather be used alongside one another. Generator => Create a basic project, generator can use wire shell to run certain commands. Maybe even do the processwire db install and remove those annoying files (install.php and site/assets/install) An example of a command for gulp would be make template, Pseudo - make the file required for the template using gulp-shell - make the processwire template This works nicely for the fixate-pw-generator since one can set the file the template use to their mvc as a default of the gulp task. WireShell => used alongside gulp/ or vanilla WireShell to manage created project (fully aware of its install pw capability, but is it automated?) Again this is only in theory for me thus far, but I doubt the one makes the other obsolete, both are big wins for the PW community.
  8. Revised , the question is this: Should what I am getting, which is what I want and expect, be a concern, because the ignored template is the same as the root template, or is this how things should work?
  9. Hi somma, sorry about the duplicate, I have revised my post. Clarifying the intent of some words and adding structure stuff
  10. Hey Somma, I have not read the thread, sorry if I am duplicating content. I have the Multisite module installed and have the module working perfectly, however I am concerned if my config in MarkupSimple nav might be unexpected behavior. My options for markup simple nav that is relevant: - I am ignoring all templates that have the name home - and show_root=true ie Options are <<--edit: add method get root -->> function getRoot($httpHost) { $root = $this->pages->get('name='.$httpHost); if (!!$root->id) { return $root; } return $this->pages->get('/'); } <<--edit -->> $options = array_merge(array( 'current_class' => 'menu__item_-current', 'parent_class' => 'menu__item_-current-parent', 'outer_tpl' => '<ul class="menu_-primary">||</ul>', 'inner_tpl' => '<ul class="menu menu__sub">||</ul>', 'selector' => 'template!=rss|home', 'show_root' => true, 'list_field_class' => 'menu__item menu__item_-primary', 'item_tpl' => '<a href="{url_nav|url}">{title}</a>', 'item_current_tpl' => '<a href="{url_nav|url}">{title}</a>' ), $options) I also have the rootPage being overwritten in the render function like so <<--edit: add method get root --> $modules->get('MarkupSimpleNavigation')->render($options, null, $this->getRoot($this->config->httpHost)) <<--edit --> , obviously returning a page with template named home. It works as expected. Rendering the page without errors and returning a navigation containing the sub domain as home, meaning the first page and also the root page using template home, and all other sub pages of said sub domain. Even more It ignores all subdomains on the parent domain. Is this what I should expect? ie ProcessWire admin tree: -home -about -bla -subdomain.example.dev -about sub -bla sub on the site the nav will contain if at example.dev home | about | bla or if at subdomain.example.dev subdomain | about sub | bla sub
  11. There is no need for this complexity. If you are already using a vhost that works it might help if you simply add more server aliases to your vhost config ie. : ServerAlias *.domain.dev ServerAlias *.domain.dev.*.xip.io for me resulting in: # project-domain.dev.conf <VirtualHost *:80> DocumentRoot "/home/dirr/to/server/project-name" ServerName project-domain.dev ServerAlias project-domain.dev.*.xip.io ServerAlias *.project-domain.dev ServerAlias *.project-domain.dev.*.xip.io ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /home/dirr/to/server/project-name> Options FollowSymLinks Allow from All AllowOverride All </Directory> </VirtualHost> In my case the project-name is a symlink pointing to the root of the project, and project-domain is the domain for the project that you added to hosts file
  12. See, I did not think further than repeater vs tables. But thanks for that insight to other alternatives.
  13. Ryan you said that you are on MAMP, could this make a difference in whether or not processwire deletes the install files? I tried setting the permission to 777 on a Ubuntu 12.04 machine, but did not delete when the installer was supposed to. So I am curious if the machine makes a difference. --edit-- As per a brainwave I tried chown www-data and that did not solve the issue.
  14. I will argue that point, as page table, tough awesome and logical for a developer seems to have some complexity that a user, unfamiliar with processwire, might find complex. Although it can replace a repeater it is not always the most logical way to work. For what if the content is specific to that page or section of the page. It depends on the situation whether repeaters are good to use, other methods might be better for a dev, but look complex for a user. a kind of, "You want to keep your bananas away from your apples, or the apples might go down faster. " situation. After all CMS is supposed to be for a end user when it reaches them not for the dev. So their perspective is primary, especially since our paradigm is that of a super user.
×
×
  • Create New...