Jump to content

joer80

Members
  • Content Count

    334
  • Joined

  • Last visited

Community Reputation

158 Excellent

About joer80

  • Rank
    Sr. Member

Contact Methods

  • Website URL
    http://www.webprojoe.com

Profile Information

  • Gender
    Male
  • Location
    Texarkana, TX

Recent Profile Visitors

3,878 profile views
  1. This was very helpful to me! Thank you!
  2. Would you consider adding an insert action to the collection panel? That way people can add children? I love this! Thank you for releasing it!
  3. I added a module for this that hooks on page save. Added an ace css text field for color coded markup and when I save, if that page has a css field, it creates the .css file on the server using a timestamp name. public function init() { $this->pages->addHookBefore('save', $this, 'updateThisPage'); $this->pages->addHookAfter('save', $this, 'makeMergeFiles'); } and something like $myfile = fopen('../assets/css/' . $newAssetFilename . '.css', "w"); fwrite($myfile, $allCSS); fclose($myfile); For some reason if I move a page it doesnt work right. Have to save it to fix, but it hasnt bothered me enough to research it. lol I usually add one to my template page, and the individual page and it finds all pages with this field and merges everything into one file. I do one for js also.
  4. Oh wow! That is really neat. I will keep that in mind. After taking the time to figure it all out, I am wondering now if in my situation it would just be better to keep the tree natural, and make a dashboard that you see by default after login, that groups the pages how I want them to be grouped. lol But this may be handy to keep in the mind in the future if I redo an existing website and dont want to do redirects and need that flexibility.
  5. Thanks @kongondo I think I have it. Ryans post helped a ton! This is not a live website yet so I am playing around with the tree layout, but I do see perks for this. This is the tree: Root - Pages - Posts - Services - Products - Menus So I wanted pages to be special in that for a page like /pages/about/, you could opt to use the short form /about/. This not only matches most websites you would migrate to processwire, but it is so clean and organized. Also, I wanted you to be able to have 2 homepages, and edit the root page and select which page you want to load as your active homepage. You could even make the blog or posts page your homepage with a click. After looking at Ryans code, I ended up turning on page segments for root and doing the below code in my root.php. //Allow pages to sit under root instead of under pages area. if($input->urlSegment(1)){ //might be 404 or a url directly under root. $realPage = $pages->get('/pages/' . $input->urlSegment(1) . '/'); if($realPage->id){ $page = $realPage; } else { throw new Wire404Exception(); } } else { //matched a page, no need to check for short link. //Set the root variable and page variable. (If on homepage, use the selected homepage instead) if($page->id == 1){ $root = $page; $page = $page->selected_homepage; } else { $root = $pages->get('/'); } } I also fixed the page path like this in site/init.php //If we are viewing the long path for a page, set the path value to the short version. (Pages live in /pages/) $wire->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'page') { $event->replace = true; $event->return = "/$page->name/"; } });
  6. So what I want to happen, is if I visit /about-us/, it will load the /pages/about-us/ page as $page without the user seeing a redirect. Is that what this would do? Or would they get redirected?
  7. I have a page located at /pages/about-us/. Is it possible to write code that looks for it at /about-us/ before I throw the 404? I would like all children of pages to check this way. Not just this one. Thanks!
  8. The FieldTypeDecimal module worked to allow people to enter cents! Do you think this should be in core or if we should allow the core float field to do this? I would think entering money would be very common?
  9. Its for the backend. People are entering money that I want to be sortable on the front end and it is odd to enter money into the backend and not have the option for 2 decimal spots.
  10. Is it possible to have a float field not drop an ending 0? Thanks!
  11. I would like a profile that allowed a front end edit ability, similar to what divi does on wordpress. I want to try and work on one, but it will be a bit before I can.
  12. Because of pixel doubling, they really need to do a 27" 5k display. That way there is no scaling blur. 4k for windows is fine though. New mac pro is too much for 99% of everyone. I wish they would have done a tower for us. I feel like the new mac pro is mac enterprise and they still need to do a pro.
  13. That helps! It sounds like I need to get access to their Azure Active Directory and not their 365 account. Thanks!
×
×
  • Create New...