-
Posts
495 -
Joined
-
Last visited
-
Days Won
4
Posts posted by totoff
-
-
Delete cache and cookies.
This was the first thing I did before posting here (I assume you refer to browser cache). Unfortunately it didn't help. And, as I said, the phenomena occurs on two machines (Win and OS X).
-
Hi all,
I've done some further testing and the problem has definitely got to do with PW's template caching: the cache should be disabled because I'm logged in as superuser but isn't.
Is there a way to disable template caching via the api during development? Or, as an alternative, how can I save all pages at once via the api? (maybe $page->save() with a foreach?)
Thanks
-
Hi all,
I'm developing a responsive Website with the following setup:
- PW 2.5.3
- Debug = true
- Template caching set to one month, guests only
- Google Chrome latest release (not the beta channel)
With this setup I'm experiencing weird problems when using Chrome dev tools:
- changes in my templates are not reflected in the frontend until the page is saved (despite caching is set to "guests only")
- after each page save I'm logged out from the admin and have to log in again
I can repeat this problem since days and on Windows as well as on OS X. In contrast, if I switch to Firefox Developer Edition's dev tools everything works as it should - no problems at all. So presumably it's some interference with Chrome's dev tools.
Does anybody has experienced the same? Any hints for debugging?
Thanks!
-
Hi Robert,
$root = $page->children('template=xyz_template');
This defines the children of the current page as root page (presumably level 2 in your site tree if I understood you right). So the pages on level 2 and 3 (in the site tree) should show up in the menu if you have the following options defined:
'show_root' => true, 'max_levels' => 2,
If they nevertheless don't render I would first of all check if
$root = $page->children('template=xyz_template');
returns an empty array.
-
Ro-bo
See the readme file, section "build a menu using a page array"https://github.com/somatonic/MarkupSimpleNavigation/blob/master/README.md
Sent from mobile
-
Hi all,
finally I just released a major update to my Unsemantic Site Profile. Here are the most important features:
- runs on Processwire 2.5.3
- delegate template approach
- includes Superfish dropdown menu (requires markup simple navigation module)
- preconfigured Google Maps implementation
- includes simple accordion textformatter Module
The profile is meant as a starting point for RWD on Processwire. Glad if you find it useful. You can see a preview here.
Question: Does somebody know how to update the entry in the modules directory?
EDIT: comments, suggestions etc. welcome
- 6
-
Hi Caelan,
did you file a bug report? https://github.com/ryancramerdesign/ProcessWire/issues
You may want to do so.
-
Hi Adam,
Is it possible that 1023 and 1024 were created at the same moment?
Not according to the timestamp. 1024 was created three minutes later than 1023.
-
Do you mean sort=-sort is not just reverting the order, but mixing it up?
Yes, exactly.
$content2 = $pages->get(1015)->children("sort=sort");
renders 1023|1024|1031 which is correct
$content2 = $pages->get(1015)->children("sort=-sort");
renders 1031|1023|1024
See what I mean?
-
Hi Nico,
if($page->numChildren) $session->redirect($page->children->first->url);
works. But I would still like to understand why
$content2 = $pages->get(1015)->children("sort=-sort");
renders child 2 as child 1 while
$content2 = $pages->get(1015)->children("sort=sort");
renders the correct order. I mean, there is something wrong obviously ...
$pages->get(1015)->children->first
is not applicable as 1015 is just one out of many sections sharing the same problem.
-
I don't know exactly, but does sort=sort not sort by the order of pages are in the pagetree?
Yes, you are right, it does. I was wrong.
Also there shouldn't be a problem if children() returns the right order as child() internally calls children()
I tried
$content2 = $pages->get(1015)->children->first;
and it returns /child 1/ (id 1023). However, the problem remains
if($page->numChildren) $session->redirect($page->child()->url);
still redirects to /child 2/ (id 1024) ...
-
Hi LostKobrakai,
thanks for your post.
$page->children without selector echoes the correct order.
$content2 = $pages->get(1015)->children("sort=-sort");
returns /child 2/ as the last item in the list (that is, the oldest page). However, /child 1/ is definitely older as per its created timestamp ...
EDIT: corrected confusion of younger/older
-
Hello all,
I was absent for a while from developing - seems I got rusty in the meantime ... Having weird trouble with trying to redirect a page to its first child. I have the following structure:
- /section/ (template A)
-- /child 1/ (template B)
-- /child 2/ (template B)
and so on.
Template A has the following conditional:
if($page->numChildren) $session->redirect($page->child()->url);
However, whenever /section/ is clicked, it redirects to /child 2/ but not to /child 1/. This happens on every section with template A and children.
To make this even more weird, the redirect has worked perfectly fine for weeks and the strange behavior occurred today after editing content in the admin.
Template A sort settings == none
/section/ page sort settings == nothing selected
I've tried selector "sort=sort" but it changes nothing (/child 1/ is the oldest page). I've also tried to set child sort order on /section/ to manual-drag-and-drop. Again without success.
I'm quite helpless with this and would appreciate any help. Thanks.
-
Thanks for sharing this insights.
-
Site of the week!
-
Further reading (sorry, German only): http://www.peterkropff.de/site/php/arrays.htm
- 1
-
<nav class="top-bar" data-topbar> <section class="top-bar-section"> <ul class="right"> <li class="divider"></li> <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'has_children_class' => 'has-dropdown' ); echo $treeMenu->render($options); // render default menu ?> </li> </ul> </section> </nav>
The pattern is very easy. The above example will attach the class "has-dropdown" to every list item that has a submenu. Try to understand the Readme by comparing it to my example and you will understand quickly.
Edit: Misspelling corrected
- 3
-
Foundation requires its classes (e.g. "has-dropdown") in order to work fine. Please see the Readme section of Somas module to learn how to apply classes to the elements of the menu.
- 1
-
the 2011 peak - that's me!
- 7
-
My experience has shown me that most clients don't seem to care any more if their website is built from a template/theme or not.
I suspect they don't even realize ... sad.
- 2
-
This is a good source for a first step into "calibrating" a monitor, though obviously it has got nothing to do with real calibration yellowled was mentioning. But as an easy, pragmatical first step it might be helpful:
- 1
-
And, as you were mentioning it, there is no such thing like "accurate colours" in webdesign. Your best bet is to purchase a monitor with neutral colour balance, sharpness and good viewing angle. The overall quality matters. And that's it. If you would like to make print work that's a different beast. Than accuracy matters a lot.
- 3
-
This site is considered market leader in monitor testing and knowledge:http://www.prad.de/en/index.html
- 1
-
Unfortunately the module doesn't seem to work with 2.5. ctrl+shift+m for example leads to /page/undefined/
Trouble with PW and Chrome Dev Tools
in General Support
Posted
HI Soma and cstevensjr,
thanks again for your replies. Logging out, clearing etc. doesn't make a difference. I'm afraid this
is the best answer as I've played around with it for another while and found the trouble to start when I switch to mobile simulation in Dev Tools while on normal desktop size everything is fine ... So presumably this is indeed a Chrome based problem.