Jump to content

joer80

Members
  • Posts

    352
  • Joined

  • Last visited

1 Follower

Contact Methods

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

Profile Information

  • Gender
    Male
  • Location
    Texarkana, TX

Recent Profile Visitors

4,121 profile views

joer80's Achievements

Sr. Member

Sr. Member (5/6)

166

Reputation

5

Community Answers

  1. Does anyone know if it is possible to show more pages/links in the admin page tree before it shows more button? Thanks!
  2. This got me where I needed to go! This is what I did: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { if($event->page->process != "ProcessUser") return; $lister = $event->object; $lister->defaultSelector = 'name%=, firstname%=, lastname%=, email%='; });
  3. I know, it's really a pretty big deal. It makes it hard to reuse things.
  4. Is there a way to change the default user filter? Instead of name and roles, I am interested in it being First Name Last Name. Thanks!
  5. In the past, one of the primary functions of a page builder would be just to implement things like flexbox, so you could have child divs stack vertically or horizontally, or align child items vertically or horizontally, or whatnot, but now the new thing is to provide a third grid option, as an easy to use front end for handling things with CSS Grid. Check out the way oxygen just introduced CSS grid controls. I think we should do something similar in our approach. https://oxygenbuilder.com/2021/02/23/oxygen-3-7-now-available/?mc_cid=9b6f18191d&mc_eid=c2de8efb6e
  6. I dont think anyone here is wanting gutenberg. Take a look at this video. Its basically just the PW backend in a side window instead of full page so you can see what you are editing while you are editing. That way you dont scroll down to a box, save, get shot back up to the top, switch tabs, hit refresh. All that is wasted time. You just edit the box and see the changes. Now, once the editing experience is updated, I think it would be nice to be able to have 2 sets of children for each page. One for the page path/child pages/url, and one for the design rows/sections on that page. So the tree would have a page path mode, and a page design mode that shows children of the page, based on the mode you are in. In the design mode, children of that page would be rows on the page, path mode would be child pages. ie. When I edit a Category page in path mode, maybe it has a text field for Page Title and Page Description, which have nothing to do with design, and its children are the products in that category. If I edit that same category page in page design mode, the first child page is called Intro Section, and has fields for design related settings for that row. I think this would be the best approach becuase the api would have a clear support for adding fields for both view modes, but not force anyone to use anspecificic front end framework or theme. It would be nice to have a slider field time for font sizes.
  7. I know some things I have struggled with in the past is exporting fields from one website to another to jump start a project, and option fields can't be imported in. I have to go to each of, say 20 fields, and manually copy and paste all options in for all of them. When I am working in a page backend in one tab, and have another tab open with the front end to see my changes, I can save the backend tab, and instead of staying where it is at, it shoots me to the top of the page. This isn't great. Would prefer it to stay there so I can tweak, save, tweak, save. Most other backend system I don't even need to hit save as changes I am making are live, but this is a step in the right direction! Also would be nice to have a way to not have to switch back and forth between tabs. Getting live editing would be even better! I even purchased the plugin for this and wasn't a huge fan of it.
  8. I have a client that wants to make all links on a CKeditor field open in a new window and not have to check the attribute in the checkbox. Is there a way to tell it to default to this?
  9. I have been working on a way to layout the files in my template folder that allows people to have more than one theme per website, and better organize the template files and pages, and this is what I came up with. What do you guys think? Has anyone done anything similar? File Layout: /templates/ _init.php. (includes and variables you want all pages to access. I put setting('theme', 'kick-off-news'); to define the active theme.) default.php (Template files can be told to use this for default behavior, or you can clone its contents for more control. I haven't needed to yet.) What is in the default.php file: <? namespace ProcessWire; //sitewide variables and/or functions. ie. Define setting('theme') as active theme. include('_init.php'); //The default temmplate can use the default HTML for the active theme $templateFilePath = $config->paths->templates . 'themes/' . setting('theme') . '/default.php'; //Render template file for the active theme echo $files->render($templateFilePath); ?> /temlates/themes/ (Holds all theme folders.) /temlates/themes/kick-off-news/ Here is what I am putting in the theme folder: /content/ (This has content subfolders for organization. ie. I did /by-page/ and /by-template/. (folders can be autoloaded from page path and template name.) /includes/ (Used for code that will be included across templates, like navigation.) /css/ /js/ /img/ default.php (You can clone for more control if needed, but I have not need to.) Below is an example of what could be in the /temlates/themes/kick-off-news/default.php file. <? namespace ProcessWire; ?> <!DOCTYPE html> <html lang="en"> <head> <? include('./includes/head.php'); ?> </head> <body> <? include('./includes/topAd.php'); include('./includes/header.php'); include('./includes/navigation.php'); //Use selected homepage if no page path. if($page->path == '/'){ $pagePath = setting('home'); //active homepage path. ie /pages/home/ } else { $pagePath = $page->path; } //Load content file for this page if it exists if(file_exists('./content/by-page' . $pagePath . $page->name . '.php')){ include('./content/by-page' . $pagePath . $page->name . '.php'); } else { //Load content file for this template if it exists if(file_exists('./content/by-template/' . $page->template . '/' . $page->template . '.php')){ include('./content/by-template/' . $page->template . '/' . $page->template . '.php'); } } include('./includes/footer.php'); include('./includes/mobilenav.php'); include('./includes/bottom.php'); ?> </body> </html> The reason why I like to be able to select an active homepage is to be able to make another homepage, and flip back and forth on which one is active as needed. No need to copy any paste data, or upload files to another page after it is approved. I mainly only use one or the other, as far as page or template html goes, but I guess you could use both at the same time with a few changes. The advantage to using using one at a time is you dont need to check for a template content file if there is a page content file. If you want to be able to load both, you probably need to have them set output variables, and after they are both loaded, push the results out. Maybe an array with a priority key and html value and loop through the array after they both load. Was overkill for me though. How I did site Tree to organize and separate the pages from the news articles. I also think there is an advantage to this over sticking all template files in the same folder, as you can put related supporting files in the same group. A news category page sidebar can be in the same folder as the news category template. Or related news layouts are next to their parent file.
  10. So setting it manually with axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; worked! Thanks for all the help guys!
  11. So interestingly enough, my axios post by default has all of the cookies needed for the post to be done by the admin user, but it is not seen as an ajax request, so it will not continue if I force it to be ajax with if(!$config->ajax) return; This is how I am doing it. methods: { processForm: function() { //event const self = this; //so .then can access outside this. axios.post('/post/', { pageID: this.pageID, text_heading: this.text_heading }) .then(function (response) { if(response.data == 'success'){ UIkit.notification({ message: '<span uk-icon="icon: check"></span> Changes saved.', status: 'success', /* primary, warning, danger */ pos: 'bottom-right', timeout: 2500 }); } else { UIkit.notification({ message: '<span uk-icon="icon: warning"></span> ' + response.data, status: 'danger', pos: 'bottom-right', timeout: 2500 }); } }) .catch(function (error) { console.log(error); });
  12. Why is no one suggesting Invision Community? Its the forum software we are on right now.
×
×
  • Create New...