Hello,
thanks for response. Unfortunately, it was my stupid, stupid mistake. I checked everything, but not a page selector. Sorry for wasted time and a lot of thanks for interest!
Marcin
Hello guys,
I got quite annoying bug - I have two multilingual textareas in one template, and after I fill them, only first is outputted. Second one's value is NULL. I checked DB, content of second textarea is on it's place.
Have anyone similar issue?
OK guys, problem is probably a bit more complicated - @Soma's solution won't work if I want to search for some list of pages' IDs in multiple page field(not through all pages in system). It's a part of quite complicated search, so list of items is processed a few time - using filter() is prefered, multiple loops would probably decrease performance.
Example: I have list of pages: $itemsList - each item has attributes field(it's a page field). There is also array of attributes' IDs - I want to filter items which have all of attributes in attributes field.
Thanks,
Marcin
@Soma: I have attributes set as pages. So I have list of all attributes(list of pages under Attributes page) and Page inputfield in some template. Now, I want to search only these ones(from this template) which have selected all of attributes I choose.
You idea seems to be quite nice thanks.
Hello,
I want to check whether PageArray contains some list of pages - as input I would like to use an array of pages' IDs. There is some elegant way to do it or I need to loop through PageArray and use $p->has("id=X")?
Thanks,
Marcin
I recently noticed, that "sessions" folder contained ~28k of sess_* files. Is everything all right? PW creates new session for each guest?
Thanks,
Marcin
@ryan, thanks for your reply. I'll try it.
Another question - is there some easy way to use PageSelect field? Module has it's own page in admin, so I probably can't easily add this kind of field to 'admin' template. The only thing I need is selected page ID.
Thanks!
Hello, thank for your reply
Whole thread you mentioned, appeared to be very helpful, thanks a lot! It solved both:
a) $somePage->set('variableName', value)
b) $somePage->template->set('filename', 'differentTemplate.php');
You idea about returning JSON - pretty cool!
PW community is really awesome.
Hello,
I'm working on simple newsletter module and I want to modify page source(different header, no navigation and sidebar) while sending email based on page.
I need one of these:
a) pass a variable to page(the same as isAjax works, eg. isNewsletter)
b) render page using different template file
and have no idea how to achieve one of above.
I'm also wondering whether it's possible to get JSON response in admin? Module method ___executeXXX() prints whole page.
Thanks, Marcin