Jump to content

neosin

Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by neosin

  1. @Robin S thank you but I can't get this to work, not seeing any error messages or anything. I created the admin.php in "/site/templates/" and pasted the code and made the necessary changes but nothing happens/changes after logging in-out and trying multiple roles. I am assuming this code will change "Pages" in the top admin nav menu to "Streams" and give it the right url but it's not changing anything in the admin nav. On a side note, how does everyone else manage hundreds of thousands of pages in a tree list? Curious to know if there is a way in admin to paginate the page list or certain pages in the page list somehow because I have 300000+ child pages under one page. It would be nice to paginate by 50 or 100 records at a time.
  2. Right but it requires the page to live under "admin" page which is not the result we want. There is also an existing module https://modules.processwire.com/modules/process-admin-custom-pages/ to do this so you don't even have to create a module for this however it uses "admin" page as the parent.
  3. While there is an existing module to add links to the admin menu, that module uses pages under "admin" page and custom template process files. What about content that lives under "home" and works like regular cms pages? Can you add option in page "settings" of pages, which would allow that page to have a nav link in the admin menu? Let's say we have a page called "Streams" that cms users can add/edit children and visitors can view on the front end. Streams live under "home > streams". Use case We want to add "streams" to the admin menu because it is a primary content container. We want cms users to be able to add and update "streams" but they must not see the admin page tree because it is full of things they don't need to see, ever. We want the admin "streams" menu item to be "active" when a user is viewing the stream list, creating/viewing/editing a "stream" instead of "pages" being active in the top admin nav menu. Currently to do this we hide the page tree from non-superadmins using the hide page tree module and then we also edit the UIKit admin theme to return null for breadcrumbs because we don't want users to see anything to do with the page tree. And lastly we use the admin page module to create the streams page under admin > streams and create a custom process file which basically duplicates all existing page code in core just to get the same functionality of the pages under "home > streams" which seems completely unnecessary. There has to be a better way. So ideally, there would be : A settings option in all pages to add a selected page to the admin menu regardless if it lives in "home" or "admin". A settings option in all pages to say "use this as default active item" when selected in admin nav menu. A built in default option to hide the pages tree from non-super admins A built in default option to hide the breadcrumb "tree" link from non-super admins
  4. My dashboard child pages are not showing in breadcrumbs, how can I get them to display ? for example, I added a page in admin under dashboard and when I navigate to it in the cms I can see it fine but the breadcrumb still shows "home > dashboard" instead of "home > dashboard > My Page".
  5. thank you, I will check it out now @adrian I've uninstalled the SEO and installed your version however the SEO image fields still show up as url text fields. Do I need to change the fields to images?
  6. @Nico Knoll for the images, it requires a URL; I am curious if I change those to file upload field will it affect the module? just want to confirm before I try, thank you
  7. @FireDaemon here are some other options. It depends how complicated you want to make things.
  8. @MilenKo For interfaces (buttons, short strings, etc) this is what we do, I am not saying either way is better just different way of doing this. ## _languages.php $lang_strings = array( 'home_button' => array( 'en'=>'Home', 'fr'=>'Acceuil', ), 'about_button' => array( 'en'=>'About', 'fr'=>'Apropos', ), 'links_button' => array( 'en'=>'Links', 'fr'=>'Liens', ), ); ## _func.php function userLang($lang){ switch($lang){ case 'fr': $lang = 'fr'; break; default: $lang = 'en'; } return $lang; } ## _main.php $lang = userLang($user->language->name); <nav> <div><a href="#"><?= $lang_strings['home_button'][$lang]; ?></a></div> <div><a href="#"><?= $lang_strings['about_button'][$lang]; ?></a></div> <div><a href="#"><?= $lang_strings['links_button'][$lang]; ?></a></div> </nav>
  9. neosin

    ASM Select?

    @adrian thank you very much for that
  10. In the PW website modules section, currently it is up to module authors to mention if their module is supported by whatever version of PW. Use the power of the community to solve the busy dev dilemma! It would be great if users could have some way to indicate a particular version works for them or not. Perhaps a simple "This module (works/or not) with current version (insert version here) of PW" and then in the module listing it shows a table of versions user have confirmed it works with. PW version | Module version | Works / Not Works 2.0.71 | 0.0.1 | 100 users said this works 3.0.95 | 0.0.1 | 100 users said this does not work 3.0.95 | 0.0.3 | 20 users said this works / 1 user said this does not work 3.0.96 | 0.0.3 | 31 users said this works Bonus of implementing this would be that it also helps lessen the forums threads "dos this module X work in PW version X?" I wonder if the poll module could be used for this?
  11. neosin

    ASM Select?

    can anyone enlighten me as what the ASM stands for or means? I keep seeing references to it all over PW forums/docs ty
  12. @ryan it would be great if there was an option to save the map (using static maps api?) to an image file locally and that local image would update should the map field values change. This would mean not needing to use an API key since the traffic would be to your hosted image and not making requests to google maps api each visit. So to the cms user they are seeing gmaps as usual but the cms saves a static version of their work to an image that is used on the output side. Also it would be neat to have a checkbox that enabled to use JS/CSS to provide artificial zoom/map moving function using the static map image assuming it was at a decent resolution/dimensions and perhaps marker placement as well. Otherwise if the checkbox is un-selected, it will show a map image of defined dimensions with no zoom or bells & whistles, etc.
  13. @Macrura I am very interested in this, is it available as a package or module for download?
  14. @dragan thanks for this, it solved my issues with the module
  15. ah gotcha, thanks for the clarification. I think the simple fallback solution is awesome. here's a list of the latest supported browsers for anyone interested https://caniuse.com/#feat=css-grid
  16. you can use grid in grid. since there is no support for sub-grids at the moment, the only way to do a layout is grid within grid. you just have a re-declare the grids that go inside the other grids. here's a quote from the smashing mag grid article What this is saying is that you cannot have a single grid system to deal with the layout but rather you need grids within grids. This creates extra code but still not as much as say something like flexbox and all it's css&divs. Also there is not reason why you can't use css-grid and bootstrap together. SImply ignore the flexbox components. Here is a sample Bootstrap responsive layout using CSS grid . Not a whole lot of code. (make sure to click the html/css tabs to see the src) also, here's a neat project Bootstrap’s grid in CSS Grid https://mdo.github.io/bootstrap-css-grid-layout/
  17. @Mike Rockett i have an events content type and the event pages expire and unpublish after the date has passed however events that are flagged as special can remain active (the url) because it will have been promoted across various media outlets. These expired special event urls will redirect to a related published content item. The related content items do not exist before or during the events. The related items are added by an editor shortly after the event has finished. Then 6 months later an editor comes back and unpublishes whichever special events they need to remove. perhaps with PW there is a better approach? I am new to PW please go easy on me
  18. updated and I can confirm the issue is resolved thanks. On a side note, I keep getting mixed up with the save buttons all over the place in the modal and the pages. Clicking save twice will take some getting used to.
  19. I found a definite bug (latest module+pw 3.0.96) If you go to a page and click children, choose batch edit, choose "edit" mode (only one i tested) as the option and then in the list; edit some children in the modal and save those - the children titles in the parent will have no value set for "title" and in the batch list it now shows empty values where the titles used to be. It appears that the variable for title is not saving or updating properly. I was editing other fields but for some reason it made my titles blank when I didn't edit the titles... very odd. also the title in the actual children themselves is now empty (in English, French is fine)
  20. @bernhard thanks, this should work I guess while($row = $result->fetch_assoc()) { $title_en = wire("sanitizer")->text($row['title_en'], array("maxLength"=>128)); $title_fr = wire("sanitizer")->text($row['title_fr'], array("maxLength"=>128)); $p = wire('pages')->get("title={$title_en}"); if(0 < $p->id) continue; $p = new Page(); $p->title->setLanguageValue($languages->get('en'), $title_en); $p->title->setLanguageValue($languages->get('fr'), $title_fr); $p->save(); }
  21. how would I do this for multilingual data? if in the external DB in each row we have some fields for both languages example: $row['title_en'] $row['title_fr'] $row['summary_en'] $row['summary_fr'] $row['other_en'] $row['other_fr']
  22. I have latest PW+Tracy installed and when I go to edit a page in the admin I randomly get these notifications I looked in those folders and there are no map files, not sure why PW is trying to find them or why they would be missing. This seems occur when I use the "inspector" in the browser to look at elements.
  23. ty Does this module allow you to redirect content from one post to another? I have pages that must remain published but redirect users to other pages, I am not sure what the best approach is for this with PW or if there is a module already that can accomplish this.
  24. I get the following error when installing in 3.0.96 Unable to install module (ProcessRedirects): Specified key was too long; max key length is 1000 bytes
  25. yes I am aware of this however in my template code I could not find the way to get the image path from the default page field. From another thread I found the path is $page->field_name->httpUrl which works as expected since it inherits the fields. What I was missing is the httpURL parameter thank you
×
×
  • Create New...