Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by brandy

  1. Thanks a lot! But I have a question - page_with_contact_email differs, depending from the site, where its send from. So I mean, I have a parent page with subpages with the different contact-email-adresses. Is this already recognized in this example? Thanks a lot!
  2. In the head there is this: <?php $form = $forms->render('kontakt', [ 'form_page' => $page->parent->title . " " . $page->title ]); ?> And in the template there is this, which shows the form: <?php $processor = $event->object; $processor->emailSubject = "Page title is: $page->title"; $processor->emailTo = "{$page->parent->projekt_bautraeger->bautraeger_mail}"; echo $form; ?> Thanks a lot!
  3. @elabx Do you have an idea, what I´m doing wrong? Thanks a lot!
  4. FYI: I disabled the recipients in the backend, but it doesn´t work either!
  5. Yeah, i forgot it too. I added following: $processor->emailTo = "{$page->parent->projekt_bautraeger->bautraeger_mail}"; As the e-mail is a pageReference-field in the parent, I have to build it like that, but it doesn´t work. The following shows me the emailadress: echo "{$page->parent->projekt_bautraeger->bautraeger_mail}"; Do you think there is a problem, as the form has recipients in the backend? All in all emailTo seems good to me: https://processwire.com/api/ref/form-builder-processor/
  6. Thanks a lot! I do have a construction, like this, for the emailSubject: <?php $processor = $event->object; $processor->emailSubject = "Page title is: $page->title"; echo $form; ?> Is it possible to make it very simple like $processor->emailReceipient = Only a quick thought!
  7. Thanks a lot! But in the file there is no information about the sender. Where does the form get its sending information? Thanks a lot!
  8. Hi! I am using Formbuilder on a website. The form is for contacting, if you are interested in a real estate. With the following code I read out, on which site you are sending the contact form: <?php $form = $forms->render('kontakt', [ 'form_page' => $page->parent->title . " " . $page->title ]); ?> So you receive a mail with the parent-page and page-title as subject, which works perfectly. Is it now possible to extend this and send the contact-form to different mailadresses, depending on the page-parent? I do have a field in the parent, which is linked to the right contact-information. Thanks a lot!
  9. Hi! Thanks! Yeah - I hardcoded the site - but it would be cool, if the domain comes out of processwire.
  10. Hi! I have been trying different things for hours, but it doesn´t work as I think it should. I want to have the full domain as page links in the source code, for example https://domain.at/site1 One try was: <?php echo $config->urls->root?>site1 This works on hovering the link and looks like the example above. But in the source code it´s <a href="/site1".... I also tried <?php echo $config->httpHost?>/site1 This ends in <a href="domain.at/site1" in the source code, but on hovering the link it shows https://domain.at/domain.at/site1 How to I get in the right way? Thanks a lot!
  11. I´ve tried once again, but I can´t find the right way. As said I have made some pages with tour recommendations. Recommendations - recommendation 1 - recommendation 2 ... These recommendations consist of text fields for "kilometer" and "hohenmeter" and page reference fields for the regions where the hotels are. The output with this one works: foreach($page->children() as $vorschlag) { echo "<h3>{$vorschlag->title}<h3> <p>{$vorschlag->tour_start->title}</p> <p>{$vorschlag->tour_kilometer_1} km | {$vorschlag->tour_hohenmeter_1} HM</p> <p>{$vorschlag->tour_ubernachtung_1->title}</p> <p>{$vorschlag->tour_kilometer_2} km | {$vorschlag->tour_hohenmeter_2} HM</p> <p>{$vorschlag->tour_ubernachtung_2->title}</p> <p>{$vorschlag->tour_kilometer_3} km | {$vorschlag->tour_hohenmeter_3} HM</p> <p>{$vorschlag->tour_start->title}</p>"; Now I want to have shown the hotels from the parent "hotels" - matching to the page reference field "tour_start", "tour_ubernachtung_1" and "tour_ubernachtung_2", which defines the region, where the hotel is. I hope you understand. I know it´s just a small adaption from the code form BitPoet, but I´m no sure about the find-part with region: <?php foreach($page->children() as $vorschlag) { echo "<h3>{$vorschlag->title}<h3> <p>{$vorschlag->tour_start->title}<br/>"; $hotels = $pages->find("parent=/unterkuenfte/, region=$tour_start"); foreach($hotels as $hotel) { echo "{$hotel->title}"; } echo "</p>"; echo "<p>{$vorschlag->tour_kilometer_1} km | {$vorschlag->tour_hohenmeter_1} HM</p> <p>{$vorschlag->tour_ubernachtung_1->title}</p> <p>{$vorschlag->tour_kilometer_2} km | {$vorschlag->tour_hohenmeter_2} HM</p> <p>{$vorschlag->tour_ubernachtung_2->title}</p> <p>{$vorschlag->tour_kilometer_3} km | {$vorschlag->tour_hohenmeter_3} HM</p> <p>{$vorschlag->tour_start->title}</p>"; }?> Thanks a lot!
  12. Thanks for the page reference hint - this works fine. But I forgot that I have another layer: I have hotels with the regions-field - every hotel is has one region (made with page references). But now I want to give some tour-recommendations with matching hotels in different regions - for example you can make a tour and sleep in two regions. Now you should see for example: Tour A: Region 1 - Hotel 1 - Hotel 2 Region 2 - Hotel 1 - Hotel 2 Tour B: Region 3 - Hotel 7 - Hotel 8 Region 4 - Hotel 3 - Hotel 4 The page reference with the regions is working in the tour-recommendations. But I don´t know how to connect the region from the tour-recommendation with the region of the hotel, so that the hotel-data is shown. Thanks a lot!
  13. Man, you´re the man - I wasn´t thinking that easy... I will integrate soon and give you an update! Thanks a lot!
  14. It´s interesting that you ask - I was just reading about page->reference in processwire, but didn´t get it. How does it work
  15. Hi! This is my page tree in Processwire: Home - Hotels - - Hotel 1 - - Hotel 2 - - Hotel 3 ... Every hotel has its fields like name, adress and so on. It also has a dropdown-field for the region, in which the hotel is located. Now I want to make another page, where the hotel should appear if the region matches with the region in the hotel-data. There should be a table where some regions are shown and below there should be the matching hotels. Is it possible to link from that new page to an array of all children of "hotels" and if the region matches the hotel should displayed? What is the right tag for that?
  16. Thanks a lot psy and poljpocket - it was a combination of your answers! Installing the missing module with the language codes works now! Thanks a lot!
  17. Sorry guys - I overworked the code: <?php foreach($languages as $language) { if($user->language->id == $language->id){ echo "<span class=\"active\">{$language->title}</span>"; } else { echo "<a href=\"{$page->localUrl($language)}\">{$language->title}</a>"; } }?> Still doesn´t work, but makes more sense now 🙂 I also tried this one: <?php foreach($languages as $language){ echo "<a href=\"{$page->localUrl($language)}\">{$language->title}</a>"; } ?> But same error here: Error: Exception: Method HomePage::localUrl does not exist or is not callable in this context (in wire/core/Wire.php line 563) Thanks a lot - and sorry for my bad post before!
  18. Yes - thanks a lot: #0 wire/core/Page.php (1512): Wire->___callUnknown('localUrl', Array) #1 wire/core/Wire.php (419): Page->___callUnknown('localUrl', Array) #2 wire/core/WireHooks.php (952): Wire->_callMethod('___callUnknown', Array) #3 wire/core/Wire.php (484): WireHooks->runHooks(Object(HomePage), 'callUnknown', Array) #4 wire/core/Wire.php (487): Wire->__call('callUnknown', Array) #5 site/templates/home.php (148): Wire->__call('localUrl', Array) #6 wire/core/TemplateFile.php (328): require('/var/www/web159...') #7 wire/core/Wire.php (413): TemplateFile->___render() #8 wire/core/WireHooks.php (952): Wire->_callMethod('___render', Array) #9 wire/core/Wire.php (484): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #10 wire/modules/PageRender.module (575): Wire->__call('render', Array) #11 wire/core/Wire.php (416): PageRender->___renderPage(Object(HookEvent)) #12 wire/core/WireHooks.php (952): Wire->_callMethod('___renderPage', Array) #13 wire/core/Wire.php (484): WireHooks->runHooks(Object(PageRender), 'renderPage', Array) #14 wire/core/WireHooks.php (1060): Wire->__call('renderPage', Array) #15 wire/core/Wire.php (484): WireHooks->runHooks(Object(HomePage), 'render', Array) #16 wire/modules/Process/ProcessPageView.module (184): Wire->__call('render', Array) #17 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(HomePage), Object(PagesRequest)) #18 wire/core/Wire.php (416): ProcessPageView->___execute(true) #19 wire/core/WireHooks.php (952): Wire->_callMethod('___execute', Array) #20 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array) #21 index.php (55): Wire->__call('execute', Array) #22 {main}
  19. Thanks a lot! This one sounds good to me: <?php foreach($languages as $language) : ?> <?php if($user->language->id == $language->id) :?> <span class="active"><?=$language->title?></span> <?php else : ?> <a href="<?=$page->localUrl($language)?>"><?=$language->title?></a> <?php endif;?> <?php endforeach;?> But I got an error! Is there something else to do, so that the system can read the languages?
  20. Hi! I have a very simple page, which I want to expand with 4 or more languages. The first thing you find is the multi-language fields-page on processwire.com. So I installed the modules and setup the different languages - now I have an tab for every language, which is fine. But now my question is how the system recognizes the browser-language and connect it to my personally set up language? For example: My language under Setup is called "Deutsch", how does the system know, if it´s on a browser with German on, that it should show the content of the field "Deutsch"? Thanks a lot!
  21. Ok, thanks - i logged out and in again, and everythings works fine! Thanks a lot!
  22. Ok, I understand. The problem earlier was that the style wasn´t shown in the toolbar - now I changed the mystyle.js and I can´t see the changes - what do I have to do?
  23. Hi! I want to set up an own style for my customer in the CKEditor. I did it like shown here (Custom Editor JS Styles Set): https://processwire.com/docs/fields/ckeditor/ But they don´t show up. I already have refreshed the plugins and in PageRender there is no Page cached! I added following line: { name: 'new Style', element: 'span', attributes: { 'class': 'text-shadow: 0 0 15px #eacd4b' } }, Thanks a lot!
  24. Thanks a lot! Sounds good - my customer has a contract with Sixx Saferpay - I think they have a quickcheckout method too? Do somebody has experience with that? Thanks a lot!
  25. Hi! My customer has numerous sites, which have similar contents on different systems with different adresses. I want to sum this up and want to make one big portal where the different subsites are accessible with different domains, but the administration happens on one point. The only thing is, how do I show a subpage with its template on the Home-page? Ok, should work with page reference. But then it uses the template from the Home-page, which is not necessary - it should use its own template. I just want to define the appropriate page in Home! Thanks a lot!
  • Create New...