Jump to content

chadamas

Members
  • Posts

    8
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by chadamas

  1. Hey, @VirtuallyCreative! The first thing that occurs to me is that you're echoing the $item li before you check to see if it has children, after which you're also echoing the $item li, and that's what is causing the top-level duplication. You could handle this a few different ways, but whatever approach you take, you basically want to determine if $item has children, and, based on that, decide what href to use and whether or not to include the arrow. I haven't tested this to see if it works, but something like this might give you a place to start: // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { echo "<li class=''><a href='". ($item->hasChildren() ? "javascript:;" : $item->url) ."'><span class='title'>$item->title</span>"; if($item->hasChildren()) { echo "<span class='arrow'></span></a><span class='icon-thumbnail'><i class='pg-form'></i></span>"; //loop through the top navigation child's children pages and output them as nested menu item foreach($child->children as $childitem) { echo "<ul class='sub-menu'>"; echo "<li class=''><a href='$childitem->url'>$childitem->title</a>"; echo "</a><span class='icon-thumbnail'>"; echo substr($childitem->title, 0, 2); echo "</span></li></ul>"; } } ... Hope that helps! If it doesn't work as expected, or if you have any questions about it, let me know. That first echo statement uses PHP's ternary operator for a shorthand if. If you aren't familiar with this, here's a pretty good article that covers the basics. Good luck to you!
  2. @adrian, thank you very much! I didn't know about this feature but can see it being useful in all kinds of scenarios.
  3. My. Goodness. I find new reasons to love ProcessWire every time I use it. Wordsworth had it right when he said "To begin, begin." (And Ryan Cramer had it right when he began building this beautiful system/framework.) Anyway, back to the topic at hand: I decided to stop overthinking it and just try something. Admittedly, I have a long way to go and I'm sure that I'll encounter more than a few problems, but I think this is actually off to a decent start. I'll probably be back for more help, but I really appreciate your advice, clsource and MindFull. If I manage to get this off the ground the way it was envisioned, I'll try to come back here and provide some additional details in case it will be beneficial for others...but in the meantime, I'll say that I began by taking a step back and remembering that in ProcessWire, everything is a page. Which means that even user accounts can have child pages if you "Show system templates" on the Templates page and allow it. From there, I selected which template was allowed for children (after creating said template, of course). With that, and the fact that ProcessWire's API allows you to easily manipulate sessions, I was off. If anyone has done this before (allowing subpages for users) and has any additional insight or considerations, please let me know. Thanks again!
  4. Hello again, ProcessWire gurus! I'm getting started on a new project, which I really want to build on ProcessWire, but it has some unique considerations and I'm having trouble wrapping my head around a few key details that will ensure that it grows from a solid foundation. I can provide additional details, if you'd like, but here's the gist: Users create a "master" account upon registration (I'm thinking simply an e-mail address, username, and password). Users can create up to three sub-accounts. Users can switch between all linked accounts--including the master account--without logging out/back in. (Here's where it gets fuzzy for me.) The currently-active account should be able to access our forum, create topics, and post replies, independent of the other associated accounts. I've attempted to approach this from a number of different directions and keep encountering roadblocks, so I'm hoping someone here has some ideas. Maybe even a forum suggestion that would work well with these requirements as they relate to ProcessWire. I'd love to use Luna, but haven't had much luck there. I could use SMF, but I built an entire website on that previously and am afraid that I'll end up abandoning PW completely (and that my code will suffer and become less-maintainable as a result). Beyond that, my shortlist so far consists of Codoforum (which looks fairly promising) and Vanilla. Honestly...this is just hard to wrap my head around. I have read many, many discussions on ProcessWire + forum integration, and I 100% understand and appreciate the difficulties and nuances of making a website more community-focused, but...how would you approach this task? If you have any thoughts, ideas, or suggestions, I'd love to hear from you. Thank you very much in advance!
  5. Thank you, Robin! Lister Pro seems incredible and I'm actually ashamed that I hadn't given it more of a look. I guess I was approaching this like some of my smaller projects and wasn't giving enough thought to some of the paid modules. A project like this could definitely warrant it, though, and I imagine that module opens up a whole new world of possibilities. I'm going to do some thinking on this before I purchase it, but that is a great suggestion. Thank you again!
  6. Hello, all! I know that I haven't contributed much here, but I've used ProcessWire quite a bit over the past couple of years and have spent countless hours browsing these forums. Most of the questions I've had were adequately answered without needing to create threads of my own. So, for starters, thank you to Ryan and this community--you all are amazing and ProcessWire is a thing of beauty. My question revolves around something that I'm not actually even committed to yet. It would be the biggest project I've ever taken on, by far, and I have no doubt that ProcessWire could handle it, but I'm working through a list of considerations and this one has me doubting my own abilities. If I were to define some pretty specific user roles, each of which had a customized dashboard and one of which (let's call it "manager") could create, read, update, and delete users in the other roles, what would be the best approach to take to allow for batch editing from this customized dashboard? What I would love to have is a list of users that a manager could edit (search and filters would be available, but that's beyond the scope of this question), with checkboxes so the manager could select individual users. Because of the way this would be set up, all editable users would be using the same page template. When the manager has selected accounts, there should be an Edit option, which basically brings up a blank template with all available fields. The manager completes and submits this form and all of the selected accounts are updated. If a field is left blank, the original value remains in all selected accounts, otherwise it is overwritten by whatever the manager typed/selected. I've seen some discussion on things like this, and even a couple of batch-edit modules, but am just not sure if a scenario like this has been addressed. Any thoughts, ideas, or considerations? Thank you all!
  7. chadamas

    I am in love.

    Haha, sorry about that. I knew that title was misleading, but used it anyway! Wordpress more than anything else, but I've tried several over the years. Drupal and Joomla (of course), CMS Made Simple, Textpattern, a couple of flat-file systems...for two projects I even built a basic CMS on top of forum software (SMF and MyBB). I think my search might be over, though. Thank you all for the warm welcome!
  8. chadamas

    I am in love.

    Hello, all! Sorry if this should be in another forum, but I didn't see one for general introductions, testimonials, and the like. I actually don't need help yet (the documentation and existing forum threads have already been immensely helpful), but I am just finishing up my first project using ProcessWire and felt the need to come here and say thanks. I've been designing/developing websites for several years now, and this is by far the most intuitive CMS I've used...from both a development and end-user standpoint. I just showed my most recent client the backend a couple of days ago and he was amazed at how easy it was for him to update content. So, thank you!
×
×
  • Create New...