Jump to content

rolspace.net

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by rolspace.net

  1. When I create subpages (news-items) and make news a parent, news is not clickable anymore, it just creates an empty anchor "#". I'm using simplemarkupnavigation. any idea how I can make "news"-menulink accesible again? found the solution...
  2. Hi everyone I've started to build a newsfeed for a customer, but I'm stuck... I have a news-repeater field including date, title, text and images. I have the link (showing date and title) to each news on the left (with foreach) and the details on the right (showing date, title, text and images also with foreach). I would love to only show the current news on the right. The latest news should be visible on the right. When I click on the link on the left side, it should change the news content on the right side. Does anyone have a simple solution for this? Here's how it looks like at the moment: http://rolspace.net/hd/energiegossau/uber-uns/news/ Thank you! Roli
  3. well, I created a new user and defined her roles / abilities. for some reason, I don't know why, all the right for "guest" user got unticked. So, anything coming from Processwire would not show on the website. put all the guest-rights back in, it worked again.
  4. That was exactely it!! Thank you so much. Problem solved!
  5. not that i know. think I've done it the same way as before. obviously, something must be different.....
  6. <img src="<?= $pages->get('/team/')->wein_image->url ?>" class="portrait img-circle" alt=""> this is line 13 in team.php
  7. done that. no change. where would I have to see something?
  8. I have to admit I don't. I have no clue how to do that or how to get information out of it...
  9. Hi everyone. Not my day today. Been working on this website and added processwire. Everything ran smoothly. In the end I tested the website on another browser and then there was nothing.. well just anything that's supposed to come from processwire wasn't there. It still worked in Firefox but nowhere else. At home, on another computer, not even Firefox works. This is the site (with processwire): http://rolspace.net/hd/praxiszurvorstadt/ It should look like this (that was before PW): http://hellerdruck.ch/kunden/praxiszurvorstadt/ believe me, all the content is there and it was visible the whole day. Just can't think of what I'm missing here... Any ideas? Any help much appreciated. R
  10. Hi Guys Thanks for the help so far. Still working on a little issue here. I have a menu with submenus. Main menu items go from page to page, the submenus refer to anchors on the pages. I want to highlight (class="current") the current menu-button. when I'm on betrieb.php#team, I want team to show up as "current". And of course when I scroll up and down, it should change to whatever anchor I go. Does anyone have an idea how I can solve this? This is my code so far. it works, but always highlights the menu AND the according submenus at the same time: $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $treeMenu->addHookAfter('getItemString', function(HookEvent $event) { $item = $event->arguments('page'); // if the item has more than one parent then it is a subpage if($item->parents->count() > 1) { $event->return = "<a href='{$item->parent->url}#{$item->name}'>$item->title</a>"; } }); $options = array( 'parent_class' => 'page-scroll parent', 'current_class' => 'current', 'has_children_class' => 'page-scroll has_children', 'levels' => true, 'levels_prefix' => 'level-', 'max_levels' => 2, 'firstlast' => false, 'collapsed' => false, 'show_root' => false, 'selector' => '', 'selector_field' => 'nav_selector', 'outer_tpl' => '', 'inner_tpl' => '<ul class="border">||</ul><hr>', 'list_tpl' => '<li%s>||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}">{title}</a>', 'item_current_tpl' => '<a href="{url}">{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<a href="{url}">{title}</a>', 'xitem_current_tpl' => '<span>{title}</span>', 'date_format' => 'Y/m/d', 'code_formatting' => false, 'debug' => false ); echo $treeMenu->render($options); // render default menu Thanks! R
  11. this worked! Thank you so much! Best Roli
  12. ah, ok. it's getting there. I rewrote the IDs now and they work. what doesn't work is the "normal" links from page to page. here's my tree, maybe that helps. I couldn't find the right "if"-statement yet... see my tree enclosed for clarification. not sure if i had to define the main-titles as childrem of "home". can't reverse it though...
  13. Thanks Robin, but i still don't get it to work. This is the main site (onepager without anchors, still work in progress): http://rolspace.net/hd/itenletzi/ And this is an example for one with anchors: http://rolspace.net/hd/itenletzi/hofladen/ Now, I need to use the menu on the main page and click on "lieferservice" and it should jump to ...hofladen#lieferservice Any ideas?
  14. Hi Guys, I have the following problem: I'm working on a website with 4 Pages, of which 3 of them have subpages (like in a onepager site). now, I get all the menu-items to work, apart from the subpages, which show on a separate, rather lonely and unstyled page (css is not loading) instead of jumping to it (like when I use anchors in non-php-sites). I'm using MarkupSimpleNavigation. I was trying to find a solution here for hours but it seems I'm missing something. Appreciate your help. Thanks
  15. Thanks for your help. But unfortunately, I don't understand much of your answer . Anyway, I'll go with the version I have for now. Will be alright. Chance you can tell me how to send the email to two email adresses at the same time? One to the person who sent the email and one to the owner of the site. This ist what I have: <?php if (isset($_POST["isHuman"])) { $fullname = $_POST['fullname']; $address = $_POST['address']; $telephone = $_POST['telephone']; $email = $_POST['email']; $product = $_POST['product']; $recaptcha = $_POST['isHuman']; } $empfaenger = "xxx@xxx.xx"; $absendername = "Beglinger-Shop"; $absendermail = $email; $betreff = "Order"; $text = " Name: ".$_POST['fullname']."\n Address: ".$_POST['address']."\n Telephone: ".$_POST['telephone']."\n Email: ".$_POST['email']."\n Article: ".$_POST['product']."\n"; mail($empfaenger, $betreff, $text, "From: $absendername <$absendermail>"); echo('<div class="quote"><h3>Your email has been sent.</h3></div>'); ?> I just can't get it to work........
  16. Hi everyone I would need help with my contact/order form. What I have so far: functioning contact form with name, email, adress, etc. When clicking send, another php site opens and says "thank you" and an email ist generated and sent off. What I want to have: Can I send the email off without having to direct to another php site? Is there a way to open a modal window instead? If yes, how? Thanks!
  17. Hi Started this thread before, still need help with something. I have several articles (Shirts) in a "shop". The visitor can check a checkbox to chose the article. The name of this chosen article should be written in the form under "article". How do I link the individual checkbox to this field? That's what I have so far: the checkbox (under "name" the article is identified from the database: <label><input type="checkbox" id="checkbox" name="<?php echo $article->article_description ?>" <?php echo ($article->article_reserved == 1) ? ' disabled' : ''; ?> class="checkbox style-2 pull-right ">I want this!&nbsp; </label> Then, in the contact form, I have the following: <div class="form-group"> <label for="product">Article:</label> <input type="text" class="form-control" name="product" id="product" value="<?php echo $article->article_description; ?>" required> </div> I guess I need a foreach code and an if else code to make it work, but I can't figure out how to do it. HELP!
  18. Hello there, I have an additional request to the above one. I have changed the shop a bit (due to time an knowledge issues). I have added an order form. The idea is, when the article's checkbox is clicked and the form filled in, an email will be sent to the owner of the site. Now, the tricky thing is, he needs to know, which article he has to send out. This is my code so far: <div id="shop" class="inner"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <h1 class="title col-xs-12 col-sm-12 col-md-12 col-lg-12"><?= $pages->get('/shop/')->title ?></h1> <div class="moredistance col-xs-12 col-sm-12 col-md-12 col-lg-12"><?= $pages->get('/shop/')->shop_rules ?></div> </div> <div class="moredistance articles col-xs-12 col-sm-12 col-md-12 col-lg-12"> <?php foreach ($pages->get('/shop/')->children() as $article): ?> <div class="col-xs-6 col-sm-6 col-md-3 col-lg-3"> <table class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <tr> <th class="item"><?php echo $article->title;?></th> </tr> <tr> <td class="item gallery"> <a href="<?php echo $article->article_image->url; ?>" data-lightbox="shop"> <img class="article-image<?php echo ($article->article_reserved == 1) ? ' reserved' : ''; // 1 = checked, 0 = unchecked ?>" src="<?php echo $article->article_image->url; ?>"></a> </td> <td class="item"><?php echo $article->article_description; ?></td> <td class="item">Size: <?php echo $article->article_size; ?></td> <td class="item">Price CHF: <?php echo $article->article_price; ?></td> <td class="item"></td> <td class="button"> <label><input type="checkbox" id="checkbox" <?php echo ($article->article_reserved == 1) ? ' disabled' : ''; ?> class="checkbox style-2 pull-right ">I want this!&nbsp; </label> </td> </table> </div> <?php endforeach; ?> </div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6"><?= $pages->get('/shop/')->shop_payment ?></div> <div id="contactResponse" class="col-xs-12 col-sm-12 col-md-6 col-lg-6"></div> <div class="moredistance orderform col-xs-12 col-sm-12 col-md-6 col-lg-6"> <form role="form" id="frmContact" class="" method="post" action="<?php echo $config->urls->templates?>mailer.php"> <div class="form-group"> <label for="fullname">Name:</label> <input type="text" class="form-control" name="fullname" id="fullname" required> </div> <div class="form-group"> <label for="address">Address:</label> <input type="text" class="form-control" name="address" id="address" required> </div> <div class="form-group"> <label for="email">Email:</label> <input type="email" class="form-control" name="email" id="email" required> </div> <div class="form-group"> <label for="telephone">Telephone:</label> <input type="tel" class="form-control" name="telephone" id="telephone" required> </div> <button type="submit" class="btn btn-warning" name="action" id="submitBtn">Buy</button> </form> </div> </div> </div> </div> you can have a look at the site in progress HERE. I was thinking of adding an empty field to the form, where the article(s) would show up as soon as there's a checked box and then sent with the other information by POST. Or is that a stoopid idea? Thanks
  19. Hi everyone I have a problem to solve here and I can't get it to work. Kinda new to php and processwire. This is what I want to do: It's some kind of shop. Article with fields (Title, image, description, price and article_reserved checkbox). I need a foreach line and an if else statement in it. This is the foreach line: <?php foreach ($pages->get('/shop/')->children() as $article): ?> <table class="col-xs-5 col-sm-5 col-md-3 col-lg-3"> <tr> <th class="item"><?php echo $article->title;?></th> </tr> <tr> <td class="item"><a href=""><img class="article-image" src="<?php echo $article->article_image->url; ?>"></a></td> <td class="item"><?php echo $article->article_description; ?></td> <td class="item">Size: <?php echo $article->article_size; ?></td> <td class="item">Price CHF: <?php echo $article->article_price; ?></td> <td class="button"><button type="button" class="btn btn-primary btn-sm">Order</button></td> </table> <?php endforeach; ?> When the article is checked as "reserved" (field: article_reserved), then there should be a class .reserved added to the image tag. if not, then not. Any ideas? Thanks.
  20. Thanks guys! I went with Horst's solution. Have a great weekend!
  21. Hi everyone I'm kinda new here and have a little problem. I'm working on a website for a band and I want to show Future and Past Tourdates (Shows). Now I managed to get the Dates to show up correctly but wonder how I could do the split between Future and Past shows. Here's my code so far: <table> <tr> <th>Date</th> <th>Venue</th> <th>City</th> <th>Ticket</th> </tr> <?php foreach ($pages->get('/shows/')->children as $show) { ?> <tr> <td><?php echo $show->show_date; ?></td> <td><?php echo $show->title; ?></td> <td><?php echo $show->show_venue; ?></td> <td><a href="<?php echo $show->show_ticket_url; ?>" target="_blank">get tickets</a> </td> </tr> <?php } ?> </table> Any quick solutions to this? Thanks
×
×
  • Create New...