Jump to content

Mike Rockett

Members
  • Posts

    1,452
  • Joined

  • Last visited

  • Days Won

    9

Community Answers

  1. Mike Rockett's post in Change "Name" field label for users to "Username" was marked as the answer   
    You won't find it in the field list - check under "Advanced", like every other template.
  2. Mike Rockett's post in htaccess: Redirect pages to subfolders was marked as the answer   
    The two rules should appear immediately after RewriteEngine On so that those redirects are the first things checked for, before any other rules are checked.
    I'd only recommend using .htaccess if you have a few redirects and a small site with not many daily visitors that would hit the old links. As an alternative use the Redirects module, or my own Jumplinks module, which might save you some time as it does support wildcards. Running these modules on a small site won't affect performance at all.
  3. Mike Rockett's post in $page->next returning NullPage erroneously was marked as the answer   
    Ah, of course. Switching to prev fixes it. Interesting how it worked before...
  4. Mike Rockett's post in Unexpected value when using new each() api method was marked as the answer   
    Just thinking out of the box here:
    $warning = ""; $divesites->each(function($item) use (&$warning) { if (!$item->marker->address) { $warning .= "<div class='alert alert-warning'>coordinates for {title} not set</div>"; } });
  5. Mike Rockett's post in pwiredeish way of redirecting? was marked as the answer   
    Hi Julio
    You can use $session->redirect($newPage->url).

  6. Mike Rockett's post in Printing page in browser shows URLs next to links was marked as the answer   
    Hi, and welcome to the forums!
    That isn't something ProcessWire would do, as PW leaves the design of your site to you.
    You more than likely have a print stylesheet somewhere that is making the links show... That's the only explanation.
    Edit: I've scoured your code, and it appears that you have a stylesheet containing the following:
    a[href]:after{content:" (" attr(href) ")"} That's the culprit. As you're using AIOM, I can't tell which file it is...
    Edit: It appears that Foundation is doing this (I think Bootstrap does too - or it used to.)
    You can override it like this:
    @media print { a[href]:after { content: none !important; } }
  7. Mike Rockett's post in Unable to login to backend was marked as the answer   
    Ah, figured it out.
    For some reason, I set the cache on the admin template instead of another template... No idea how I did that. Must have just clicked on the wrong template and not noticed which one I was editing.
  8. Mike Rockett's post in where can i add or install the field PageTitleLanguage? was marked as the answer   
    Okay, if you go to Fields and then to title, you can change the type to PageTitleLanguage. (I actually think it's meant to be that way...)
  9. Mike Rockett's post in Installing More than One Processwire was marked as the answer   
    Hi, and welcome to ProcessWire!
    To answer your question: yes, that's the way it's supposed to be done. Each website should have its very own installation of ProcessWire. I do believe there is a module that assists in using one installation for multiple sites, but this is only recommended for a single client that has multiple sites, not for multiple clients running on different servers.
    I'm not sure what you mean by minefield, though. Could you elaborate that for me?
  10. Mike Rockett's post in Problem with the PDO connect on rare hosting was marked as the answer   
    Perhaps this could point you in the right direction?
    What version of PHP/MySQL are you running?
  11. Mike Rockett's post in Setup > Templates and Setup > Fields menu links not working was marked as the answer   
    Sounds like an Apache/htaccess problem to me... Though, can't be sure. Do you have anything in your PW logs? Apache logs?
  12. Mike Rockett's post in Customise page tree titles was marked as the answer   
    Under your template's Advanced tab, you can add your field names under "List of fields to display in the admin Page List"
    Update: There also this (not sure on 2.5 compatibility, if that's what you're using)

  13. Mike Rockett's post in Unable to change page template; limited list shown was marked as the answer   
    Although, the manual drag 'n drop sorting is not working for this page. I need to display the pages in a particular order in the menu, but the sort is not reflecting in my template. I'm using the following call:
    $items = $wire->pages->find("main_menu_group={$menuGroup}"); Edit: I have made sure that the template's sorting option is set accordingly. Even swapped it around so that the sorting option would be defined on a per-page basis. Doesn't work...
    Edit (again): I see that it works in my sidebar, which calls children(). But if I call $wire->pages->get('/')->children("main_menu_group={$menuGroup}"), it still doesn't work...
    Ah!: Silly me, I assumed it was doing it recursively for some strange reason.
×
×
  • Create New...