• Content count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About mtn

  • Rank
  1. Is it possible to create a custom spam message? Along the lines of: $modules->get('SimpleContactForm')->render(array( 'spamMessage' => 'Custom Spam Message' ));
  2. While testing the recently installed Comments module, the following error is occurring (while using valid email addresses): Error: Exception: Invalid email address (processwire@localhost:8888) (in . . . /wire/core/WireMail.php line 105) Error: Exception: Invalid email address (processwire@localhost:8888) (in /Users/main/Sites/artisan-skill-revival/wire/core/WireMail.php line 105) #0 /Users/main/Sites/artisan-skill-revival/wire/core/WireMail.php(130): ProcessWire\WireMail->sanitizeEmail('processwire@loc...') #1 /Users/main/Sites/artisan-skill-revival/wire/core/WireMail.php(245): ProcessWire\WireMail->extractEmailAndName('processwire@loc...') #2 /Users/main/Sites/artisan-skill-revival/wire/modules/Fieldtype/FieldtypeComments/CommentNotifications.php(151): ProcessWire\WireMail->from('processwire@loc...') #3 /Users/main/Sites/artisan-skill-revival/wire/core/Wire.php(383): ProcessWire\CommentNotifications->___sendAdminNotificationEmail(Object(ProcessWire\Comment)) #4 /Users/main/Sites/artisan-skill-revival/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___sendAdminNot...', Array) #5 /Users/main/Sites/artisan-skill-revival/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\CommentNotifications), 'sendAdminNotifi... How may this issue be overcome? Thanks!
  3. Thank you kongondo & Robin S! Use of your suggestions led to the following successful code (in case it may be helpful to others): $entries = $page->children("sort=$subcats, sort=page_headline"); $subtitle = ''; foreach($entries as $entry) { if($entry->$subcats->title !== $subtitle) { $subtitle = $entry->$subcats->title; echo "<h3>$subtitle</h3>" } echo "<div class='listing'>"; echo "<img src='{$entry->page_main_image->url}' alt='{$entry->page_main_image->description}'>"; echo "<h2>$entry->page_headline</h2>"; echo "<p>$entry->page_summary <a href='$entry->url'>Read on</a></p>"; echo "</div>"; }
  4. Layout: Pages are created as children of Categories. On the Pages template there is a "Select Option" field to select the particular subheading under which the page is to be displayed. Objective: The Category page is to be an index of child pages listed under various subheadings (as created by the Select Option field). Question: What is the syntax to reference that select option field of the child page template in order to display those subheadings and their respective child pages? Presently, I have a $subcats variable containing the name of the appropriate select option field for the Category and the following code which simply displays the sorted child pages (sans subheadings): $entries = $page->children("sort=$subcats, sort=page_headline"); foreach($entries as $entry) { echo "<div class='listing'>"; echo "<img src='{$entry->page_main_image->url}' alt='{$entry->page_main_image->description}'>"; echo "<h2>$entry->page_headline</h2>"; echo "<p>$entry->page_summary <a href='$entry->url'>Read on</a></p>"; echo "</div>"; }
  5. Is the module compatible with PW v. 3.0?
  6. On a "site-settings" page, I have a "watches" image field that contains 5 images. The first and last are easily echo-ed with"$a->first();" and "$a->last();", but I am having difficulty in creating the correct syntax to display images 2-4. Any help would be appreciated. Thank you! Present code: <?php $selectWatch = $pages->get("/site-settings/")->watches; $watchOne = $selectWatch->first(); echo "<img src='{$watchOne->url}' alt='{$watchOne->description}' class='time'>"; ?>
  7. I'm new to PW -- downloaded and went through tutorials -- and need advice in best approach to template creation. I want to get started on the right track. The website will consist of approx. 300 how-to articles, a list of which (with thumbnail image) is to be displayed on category pages (main menu - 6 categories) under various subtitles (not part of menu). CATEGORY1 -- Subtitle1: ---- Article1 ---- Article2 -- Subtitle2: ---- Article3 ---- Article4 -- Subtitle3: ---- Article5 ---- Article6 CATEGORY2 . . . About 10% of the articles need to be listed under multiple categories. In creating Article template & template files for delayed output pages, what would it be the optimal way to organize template and template files? (A. having two separate template/template files for single and multiple category articles -- simply placing the single-category articles in their respective admin hierarchical page tree and doing what with multiple-category pages?, or B. -- having a single template for all pages that would have 3 category fields (and their respective subtitle dropdown selection fields), using only the first category field for single-category pages?, or C. something else.) What would the resulting admin hierarchical page tree be? What modules would be helpful in creating this site? Thank you!