Jump to content

Zeka

Members
  • Posts

    1,065
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zeka

  1. Hi @backes Is this behavior the same in cases when you logged in to admin panel and logged out?
  2. Hi @Krlos It looks like good place to use ProField: Table
  3. Hi @Nils Wiere Try this: $pages->find("template=B, sort=parent.title, sort=sort"); or this $pages->find("template=B, sort=parent.sort, sort=sort"); Not sure that this will work, but give a try. As alternative: $parents = $pages->fint("template=A, sort=sort"); $items = new PageArray; foreach($parents as $parent) { $items->import($parent->children("sort=sort")); }
  4. No, there isn't. And there is no reasons to prefer .html endings to slash even from SEO point.
  5. Hi @cjx2240 Here is Ryan's note about that: The question is an easy one when talking about forms that get submitted once, but not so easy when talking about forms that edit existing pages and will continue to do so indefinitely in the future. That's why you see in initial value support in many Inputfields that doesn't apply when used in a page/field context. Meaning, you see the option when using an Inputfield in FormBuilder, but not when using the same Inputfield for editing a page field. When it comes to this FieldtypeOptions module, initial value support (pre-selected options) needs "required" status for the Inputfield because it has to have some way to know when to populate the initial value. It knows to populate the initial value when there is no selection present. There isn't any other straightforward way for it to make that determination, unless we limit the feature only to newly created pages. If the user were to de-select everything so that no options are selected, then the initial value would once again get populated the next time they edited the page. That's why we only support initial values if "required" status is active, as it prevents the possibility of the user de-selecting all options and assuming it will stay that way. There is an easy way around it though. Create an option to represent "no selection", likely your first option. If the user literally wants no selection, they would select that, and still meet the "required" status of the field. From there you can have any pre-selected option(s) you want. Since you as the site developer put that option there, you can likewise know when to act–or not act–upon it in your output code.
  6. If you use _done.php or _main.php files aproach, you can disable automatic append of _done.php file under "Files" tab in template settings and then just use $page->render().
  7. It is possible. You have to set this field as required in field settings under input tab. And in "Default Value" section set you desired default values ( actualy IDs of this values).
  8. Hello @Juergen I had the same problem as you, but after update from 3.0.41 to 3.0.42 I have found that this error is caused by any code like: if($page->image_field) where in field only one image. I really not sure what helped to me, but for the first time I used Updater module for update, but then I done update manually and this error disappear, That's why I didn't open issue for it.
  9. Hi @heldercervantes. It looks very similar to my issue, checkout this topic
  10. @tpr maybe you could make some note about this feature in AOS docs.
  11. As alternative to this part of code you can use "Default value (when empty)" in image field settings.
  12. @SamC check you image field settings on "Details" tab. If you want to upload only one image to this field you should choose third option "Single item" , after this change your code should work. Or try $firstItem->mainImage->first()->size(768, 256, 'center');
  13. Hi @SamC You can use find("")->first(); $entries = $pages->find("template=news-entry, limit=6, sort=-sort"); $firstItem = $entries->first(); $otherItems = $entries->not("$firstItem");
  14. Hi @godmok. Some time ago I had almost the same questions as you and I came to this solution: $input->whitelist('q', $q); $qs = explode(" ", $q); foreach($qs as $key => $q){ $qs[$key] = $sanitizer->selectorValue($q); } $selector = "template=product, product_cache%=". implode("|", $qs) .""; $matches = $pages->find($selector) And it looks like it covers
  15. Thank you @adrian for so useful module. It would be super great to have opportunity to disable default language for some branches/pages
  16. Here are my code snippets for that <?php echo $all_products->renderPager(array( "nextItemLabel" => __("След."), "previousItemLabel" => __("Пред."), "firstNumberItemClass" => "pagination__item--first-num", "lastNumberItemClass" => "pagination__item--last-num", "previousItemClass" => "pagination__item--prev", "nextItemClass" => "pagination__item--next", "firstItemClass" => "pagination__item--first", "lastItemClass" => "pagination__item--last", "currentItemClass" => "pagination__item--active", "listMarkup" => "<div class='pagination'><ul class='pagination__list'>{out}</ul></div>", "itemMarkup" => "<li class='pagination__item {class}'>{out}</li>", "linkMarkup" => "<a class='pagination__item-link' href='{url}'><span>{out}</span></a>" )); ?> and SASS styles ( mixins from foundation ) $module: 'pagination'; .#{$module} { text-align: center; background: $white; border-radius: $global-radius; padding: rem-calc(5); box-shadow: rem-calc(0 1 4 0) rgba(0, 0, 0, 0.1); &__list { @include pagination-container; display: inline-block; margin-bottom: 0; } &__item { display: inline-block; padding: rem-calc(5) rem-calc(10); &--active { a { text-decoration: underline; } } a { @include button-base(); @include button(false, $brand-darker, darken($brand-darker, 5), $white, solid); border-radius: $global-radius - 2; margin-bottom: 0; padding: rem-calc(3 7); } } }
  17. Zeka

    Padloper showcase

    Hi @MuchDev ! Nice site. Could you please share some hints how you customized your checkout form ( i mean markup .form-group etc. )?
  18. Hi. Is it possible to disable HTML minifing or activate "Developement mode" from config file? Thanks
  19. @adrian I'm sorry if i wasn't clear enough. Here are some screenshots of my config So as you can see I enabled BCE for one template and one page ( actually it's the same page). Here I set to hide children tab and place BCE in new tab. I expected that it would affect only page from previous screenshot, but children tab was removed from all templates
  20. @BitPoet Thank you for suggetion. You pointed me to the right direction. In this way it works only for non-default language ( becaouse there are status table for default language in db and status____ for non-default langauges where ____ is id of langauge ). $currentLang = $user->language; $repeater_items->find("menu_item_page.status$currentLang=1"); I tried to use OR group to cover default langauge $currentLang = $user->language; $repeater_items->find("(menu_item_page.status$currentLang=1), (menu_item_page.status=1)"); It looks like needed pages were found but they are in itemsRemoved array ( I see it first time, so I don't know what is it ).
  21. Hi @adrian Thank you for the module. Just faced a little problem. Option "Remove children tab" does not respect settings from "Where editing tools are available and separately configurable" section. It looks like not very expected behavior? It took me sometime to figure out where is my children tab escaped)) Ideally it would be if we have separate restriction setting for this option.
  22. Hi. I have this structure of page page -- repeater field --- page select field -- repeater field --- page select field etc I'm looking for better way to detect is there at least one page in page select field in all repeaters that available for current language. $currentLang = $user->language; $repeater_items = $page->repeater_field; $groupHasLang = 0; foreach($repeater_items as $ri) { if($ri->page_select_field->getLanguages()->has($currentLang)) { $groupHasLang++; break; } } if($groupHasLang) { // do something } Maybe it could be accomplished just with find method? Thank for any suggestions!
  23. Check id`s of generated fields. They shoud be like Inputfield_fullname and adapt your script for new id`s
×
×
  • Create New...