nabo

Members
  • Content count

    20
  • Joined

  • Last visited

Community Reputation

4 Neutral

About nabo

  • Rank
    Jr. Member
  1. sorry... solved :-/
  2. Hi all... i tried and searched (maybe not enough, sorry ) I've got an offer template with a multiple page reference with stores. I would like to get all offers associated with a store. Template: offer store -> page reference (multiple)
  3. Sorry all... found it!!!!!!!!!! I need to activate other languages for any single store! Is there a way to do a massive update?
  4. But strange thing.... the store url, in other languages than default, exists and it works
  5. Hello... I search a lot but no results I've got a simple selector $items = $pages->find("template=store"); I've got result with default language... no results with other languages
  6. Hi @Zeka very easy indeed!!! Thank you very much!
  7. Hi @Zeka thanks, but in this case I think I will find all pages that with template store and repeater_field.hours = 10. I come with an example. These are the fields in my repeater: days hours I'm in the store page and I want to find only hours related to the day, for example friday. The example you provide me is not what I need
  8. Hi I've got a template for a store and I use repeater for opening hours. When I'm on the store page I would like to search inside this repeater to find the hours related to a precise day. Is it possible with selectors?
  9. Hello I wrote a function that read files tree from a folder and rebuild the structure with PW templates. I tested it on a frontend template and it works perfectly. Now I'd like to call this function inside backend by simply clicking on a link on the main menu. How can I achieve this? thanks
  10. I meant, not create, but choose from a list like other attributes. Anyway I solved with class as you wrote.
  11. Hi I'm implementing uikit on a theme. It can be useful (and in my case necessary) the opportunity to add data-attributes to ProcessPageEditLink, with or without values. Example <a href="my-image.jpg" data-uk-lightbox>...</a> <a href="" data-uk-lightbox="{group:'my-group'}">...</a>
  12. Thanks for the tip, but I was not able to reach my goal. I edited LanguageFunction adding a new condition
  13. Hello is there a way to avoid default language in TRANSLATABLE STRINGS if the value of the language set in frontend is empty? $this->_("Hello"); If there's no translation in other language I wouldn't see "Hello"
  14. NP @kixe, thanks to you!
  15. Solved!!! Hope can be useful This is the class class SeoTemplate extends WireData implements Module { public static function getModuleInfo() { return array( "title" => "SeoTemplate", "summary" => "Module for add seo_rules field to template.", "version" => "0.0.1", "autoload" => true ); } public function init() { $this->addHookAfter("ProcessTemplate::buildEditForm", $this, "appendFieldToForm"); $this->addHookBefore("ProcessTemplate::executeSave", $this, "saveSeoRuleField"); } public function appendFieldToForm(HookEvent $event) { $languages = $this->wire('languages'); $template = $event->arguments[0]; $form = $event->return; $field = $this->modules->get("InputfieldText"); $field->attr('id+name', 'seo_rules'); $field->attr('value', $template->seo_rules); if($languages) { $field->useLanguages = true; foreach($languages as $language) $field->set('value' . $language->id, $template->get('seo_rules' . $language->id)); } $field->label = $this->_('Seo rule'); $field->description = $this->_('If you want to add a custom rule to MarkupSEO'); $field->notes = $this->_('To define a variable use {title} syntax'); $form->insertAfter($field, $form->tags); $event->return = $form; } public function saveSeoRuleField($event) { $template = $this->templates->get($this->input->post->id); $template->set('seo_rules', $this->input->post->seo_rules); $languages = $this->wire('languages'); if($languages) { foreach($languages as $language) { $template->set('seo_rules'.$language->id, $this->input->post->{"seo_rules__$language->id"}); } } } }