-
Posts
715 -
Joined
-
Last visited
-
Days Won
3
Everything posted by froot
-
$selector = "books.category=$category, limit=24"; $books = $pages->find($selector); tried that now but it also doesn't work. I kept it simple here but I'm getting just one result: echo count($books); // returns 1 and the markup is empty. My guess is it's now counting the columns with that name, not the cells within it? (and that's without even addressing the mentioned pipe-problem.)
-
in my last post here I said fields, my bad, what I meant is column names inside a ProField table. I use $matches = $page->books("limit=24, $selector"); books being the name of the ProFields Table on this very page. The thing is, it works as long as I don't use a search term, so it looks to me as if passing the selector to the array works fine, except for where I use the pipe. The mentioned category=$category inside the selector is also referring to a column name inside the ProFields Table and I have no issue there. Either column_name~%=$q column_text~%=$q also return results but neither column_name|column_text~%=$q column_text|column_name~%=$q do. Thanks for help
-
I now renamed the two fields name and text to something more specific but still no success. See attached what I mean by "select*", it's an option field. But there's no issue with that field, just with the two text fields mentioned and the pipe.
-
Exactly, I get no results, not for the left nor for the right part of the pipe. column "name" of type is "Tiny Text (up to 255 chars)" column "text" is of type "Text" and column "category" is of type "Select*" The rest are no fields or columns, just additional filters passed to the server via HTML-form with get-method. Thanks for looking into this
-
I did some more investigation and updated the PW-version to ProcessWire 3.0.164 so that I can use the operator ~%= Now it seems to work. However, the issue persists with another page where I use ProFields-Table. $selector = "category=$category, name|text~%=$q, name^=$letter, sort=$getsort"; All the other selectors seem to work fine and search a specific column in the table but as soon as I use pipe it just wouldn't.
-
Then I'm afraid I might be among the said 0.5%. While I have learned the PW-API and built the entire website, the data-handling and migration of an existing old joomla-database and its maintenance was planned to be done by the client via SQL, who would browse the tables and change a lot of data at once, all, hopefully, without the need to learn the PW-API. As much as PW shows clear advantages for the developer in terms of building the website, these advantages pretty much take a backseat once the website is finished and goes live, isn't it?
-
please excuse my ignorance, I learned something today, will look into that. I was just wondering if for example there's any advantage in regards to the database complexity, either in using the same field on different templates or in creating a new field of the same type for each template. thanks!
-
I think the pipe-selector should work as OR-operator but it doesn't. It only selects the option before the pipe, not after it. if($q) { $selector = "template=article|blog_post|book, title|body|author*=$q, sort=$getsort, title^=$getletter, limit=25, has_parent!=2"; $matches = pages()->find($selector); } Any ideas?
-
I'm quite new to Processwire, and I struggle with the database structure. Each page has specific fields. To my understanding, most of the tables in the database, each corresponds to a field and each field is linked to another field on the same page by the page_id. That's all I can see when viewing the field: pages_id and data. It would of course come in very handy if you could view each page as a table instead, a column for each field and all the content in the cells next to one another. I doubt this issue hasn't been addressed before, it's unusual the way it is now. I now wonder if I mixed something up at the very beginning and if there's a way to change or work around this dilemma. My client is actually quite educated on databases and would enter the content rather via SQL than via PW-admin-backend. Thanks for help!
-
thanks! that did it
-
I had to update uikit to vesion 3.5.5. to get a certain functionality working. (set 'draggable:false' for carousel). I replaced the folders: wire/modules/AdminTheme/AdminThemeUikit/uikit/dist/css/ wire/modules/AdminTheme/AdminThemeUikit/uikit/dist/js/ It works as intended in the frontend, however the css in the admin-panel is now broken. any ideas?
-
@horst yes, that did it! All good now. Danke vielmals!
-
@horst Followed all your advice, deleted the .zip and .json files in those /assets/files/ folders, checked the "overwrite existing files" as suggested for the mentioned fields. Now I at least can upload the german language package to the default language entry. I deleted all the files within the secondary language (now called english). However, the frontend still /de/ in the URL for the english site and nothing for the default language german (which is fine). How to change that? The page contents and custom fields are mixed up as well (I might just swap that manually since it's not that big of a site). Thanks so far! EDIT: now I deleted the secondary language because I thought re-installing might fix the issue, also since english doesn't require any files to work. But now it doesn't work in the frontend, all links to default language.
-
getting closer to the issue I think… I renamed the default language to deutsch/german, deleted all the json files in there. But I can't upload the german .json files nor the complete .zip file to this language. I'm getting errors: Refused file wire …… .json because it is already on the file system and owned by a different field. I even deleted the other secondary language, first only the json strings in there, now the entire language package. Still can't upload. Thanks for help!
-
I thought so too but now I came to doubt that
-
@Ivan Gretsky thanks for the input, but I think I tried that and couldn't figure out how to change the /en/ to /de/ and vice versa.
-
the thing is, the entire project is basically finished and all strings translated to german, except that the default language should be german and english secondary. I didn't think that would be a problem later on and should be considered from the very start. Now it so far seems like a big hassle, most solutions suggested here assume that not much progress has been done on the project anyway or the required default language not even created. (Another solution: I'd be fine with switching the strings manually, however, the url then still stay /de/ for english and /en/ for german, don't know how to change that.)
-
I have a site with two languages english and german. Default language is set to english, but should be set to german. Is there an easy way to swap them? Many thanks
-
thanks, that did it!
-
Could you please help me brainstorm why the banner just wouldn't show up on the frontend? I'm out of ideas. I tried all the usual troubleshooting suspects already: clearing cache, clearing cookies, testing in other browsers, incognito mode, uninstalling/reinstalling, testing on local and live server, testing css rule conflicts, javascript conflicts, … but nothing seems to work. The same goes for the other similar module MarkupCookieConsent, just wouldn't show up. It works for another website I built though. Many thanks!
-
How to generate breacrumbs? I have this in my template if(page()->parent->id > $home->id) echo ukBreadcrumb(page(), [ 'class' => 'uk-visible@m breadcrumbs']); which is default with the profile. I want to add the current page and it looks like I need to re-build it from scratch to do so. However, the documentation is quite poor regarding breadcrumbs. no clue what is meant by… $processPageList->setupBreadcrumbs(); $processPageEdit->setupBreadcrumbs(); $processPageAdd->setupBreadcrumbs(); … there's no explanation and no examples but it's pretty much all I could find on this topic Thanks for help!
-
thanks! I figured out my own approach, works as well… $cols = $page->table->getColumns(); foreach($cols[10]['options'] as $opts => $value) { $out .= '<option value="'.$value.'">'.$value.'</option>'; }
-
Inside the ProFields Table I have one column of type "select" for which I entered several options to choose from. How can I return these options? I mean loop through them to build my markup.
-
true. I missed that somehow, was more focused on the code. Anyways, that did the trick, thanks a lot, indeed dead simple ?
- 11 replies
-
- pagination
- get
-
(and 2 more)
Tagged with:
-
I have a similar issue, what I basically need is to reset the URL-segments, i.e. go back to the baseURL(?) without /page2 or above whenever the get variables change. Because when I'm on /page2 I and switch the search term, it won't find anything because the results I would get are not enough to require a pagination. You would think that something like this would be dead simple, but it's not. I don't even know what I exactly need to change. linkMarkup? urlSegment? pageNum? So here's how I tried to solve this now if ($session->what != $what || $session->letter != $letter) { $input->setPageNum(0); } $session->letter = $letter; $session->what = $what; I tried many different API commands, but they all won't work. Please help!
- 11 replies
-
- pagination
- get
-
(and 2 more)
Tagged with: