Jump to content

Danjuan

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Danjuan

  1. Hi I'm still getting to grips with process wire. I'm wondering if and how I can restore a previous site? I've tried searching but can't find anything. Basically, I've been trying to learn by creating my own themes / sites but when I want to actually upload to a live site I don't know how to do it or if I want to give the theme / site to someone else to use, how can I do this? Thanks
  2. Hey guys I'm trying to style the editor pane so never mind what text i'm editing the pane will always be at the top or bottom. so far i'm using the following code to try and move into the correct position: .cke { position:fixed; top:0; left:0; } but it doesn't appear to work or it's getting overridden Has anyone successfully styled this pane and can help?
  3. @netcarver You're right, I'll tidy up my code and post it along with more detail.
  4. Hi I'm still very new to Processwire and I'm trying to get to grips with it. Basically, at the moment my site is just one big image with a menu button, when the menu button is clicked, an overlay fades in covering the site. In the overlay is my navigation, when I click a link I want to be directed to that page, so far this is the easy part, but when I click the login button, I want the navigation replaced with the login boxes and a button to appear in the top left hand corner that allows the navigation to replace the login boxes. I cannot figure out a way to do this and any help would be appreciated. Thanks
  5. Hi I've just got involved with Processwire, and I need a little help. Basically when a user visits my website, I want the standard website to show, once they log in I want to show a client based site that is populated with all the users contacts, quote, invoices, I do not want to give them any other access to the site. Th ideas is when they log in, they can create their own database of clients and allow them to email their clients quotes and invoices. Firstly is this possible? I'm sure it is. Secondly, how do I go about implementing it? Thanks
  6. Hi I have created a slideshow that uses child pages as the slides and the image is taken from a field called hero_image within that child page. The images are showing for the slides but there's an issue, well a couple. #1 When right clicking the site and inspecting the element, I have 3 notices on the page all pointing towards line 7 which I've pasted below: echo "<div class='slide' id='hero-slide-$child->title' style='background-image: url({$child->hero_image->url})'>$child->title</div>"; In the hero_image field: Maximum Files: 1 Formatted Value: Single Item #2 When clicking through the slides, the url address changes and adds /#section1/1, /#section1/2 etc depending on what slide. I do not want this and can't find a way to stop it. I want the address bar to be www.blahblahblah.com unless i go to that child page, then it will be www.blahblahblah.com/page1 Thanks
  7. Thank you for the reply. Ok so that appears to have done something to the output but the image is still not showing. So I changed url('{$child->hero_image->url}') to url({$child->hero_image->url}) and it now appears to work although I have 2 important issues Issue 1: When click inspect element I get a 3 notices at the bottom of the page <b>Notice</b> " : Trying to get property of non-object in " blah blah blah on line 7 which is "<a href='$child'><div class='slide' id='hero-slide-$child->title' style='background-image: url({$child->hero_image->url})'>$child->title</div></a>\n"; Issue 2: So after a little testing, it appears to add /#section1 /#section1/1 /#section1/2 /#section1/3 to the url depending on what slide it's on, I know this is nothing to do with the original post but I didn't want to create a new post as it's really part of the same question. How do i remove this from the url so it's nice and clean? Thanks
  8. Thanks for the code, I tried this but the image won't show. Looking at the html code in generates, i can see it outputs <div class='slide' id='hero-slide-Design' style='background-image: url('/site/assets/files/1023/')'>Design</div> Any ideas?
  9. Hi I am trying to create a slideshow based on children/sub-menu items. Each child/sub-menu has an image field called hero_image The following code displays the amount of slides that matches the amount of children I have and displays the child's title so I know it's correct. So far the below code works perfectly although there may be a better way of doing it. <!-- HERO--> <div class="section" id="hero"> <?php foreach($page->children as $child) echo "<div class='slide' id='hero-slide-$child->title'>$child->title</div>\n"; ?> </div> <!-- /HERO--> What I now need to do is replace the title with the hero_image that I have uploaded in the child page. In my html version, I have this image placed inside an external CSS file so ideally I need to keep it the same. In my external CSS file, I have tried the following but nothing shows, is this even possible to do in an external CSS file? #hero-slide-design { background-image: url('<?= $page->hero_image->url ?>;'); }
  10. Hi LostKobrakai Just figured it out but didn't replay quick enough. Thanks for your help and the very speedy response.
  11. Hi Thanks for the quick reply. I'm still getting to grips with processwire, where do I put that? Thanks
  12. Hey guys i've just started with processwire so be gentle. I've managed to use ajax on the site to load dynamic content using the delayed output method but it seems to be duplicating my navigation menu. In my main.inc file I have the following: Navigation and Content. <!doctype html> <html lang="en"> <head> <script type="text/javascript"> $(document).ready(function() { $("#topnav a").click(function() { $("#topnav a.on").removeClass('on'); // unhighlight selected nav item... $(this).addClass('on'); // ...and highlight new nav item $(".content").html("<p>Loading...</p>"); $.get($(this).attr('href'), function(data) { $(".content").html(data); }); return false; }); }); </script> </head> <body> <ul id='topnav'><?php // Create the top navigation list by listing the children of the homepage. // If the section we are in is the current (identified by $page->rootParent) // then note it with <a class='on'> so we can style it differently in our CSS. // In this case we also want the homepage to be part of our top navigation, // so we prepend it to the pages we cycle through: $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; } ?></ul> <div class='content'> <?= $content ?> ​</div> </body> </html> Here's my home.php (Other template files are the same for the time being): <?php $content = $page->body; ?> It replaces the content just fine but I don't want it duplicating the rest of the page? What am I doing wrong?
×
×
  • Create New...