-
Posts
287 -
Joined
-
Last visited
-
Days Won
2
Everything posted by JayGee
-
Just to double check - did you enable page numbers in the page template settings?
-
I think I did - but will double check as got frustrated and parked it for later on lol! I think it was causing strange things like the item still showing in the repeater without affecting the on/off toggle and then re-enabling when the parent page was saved. Will give it another go and report back.
-
Thanks all - that does all seem a bit of a headache - it's not mission critical so will probably just stick with deleting unused items rather than disabling them or just let the user manually manage them. Had naively assumed that as repeater items were pages behind the scenes that the 'toggle' would just be a proxy for unpublishing them or something similar.
-
Yes I think you're right! Thank you!... that was driving me crazy!
-
Pull Live website to Dev site and Sync the Media Files and Blog Post
JayGee replied to Kathleen's topic in General Support
This is really cool - hadn't seen this tutorial before. -
I think it could be because you are also using url segments. You can set the base URL for the page to be paginated when calling the pager. I can't seem to find the relevant docs at the moment but this is a snippet from a project I have open at the moment that I recall has the same issue that hopefully shows the syntax you need. $pagination = $articles->renderPager(array( 'baseUrl' => '/sector/'.$currentCat.'/' ));
-
Unless I'm imagining it, I'm sure I've previously had the option in at least one PW installation to search/sort/filter child pages under a page's children tab. I'm working on a project that will eventually have a lot of sub-pages that the client will want to search for ease of management but I can't currently see these controls available. Am I simply imagining this functionality? Was it an extra module? Or does it only show up once there is enough sub-pages to paginate?... someone put me out of my misery!! ?
-
Pretty much as per the topic subject - trying to figure out how to toggle a repeater on/off using the API. Have tried setting the page status which indeed seems to hide the item but this doesn't reflect the toggle on the page editor so when you next save the page they come back on.
-
Ok - good call on the namespacing. Can confirm the following combo of using wire404Exception() instead of PageNotFoundException() and namespacing works as follow: throw new \ProcessWire\wire404Exception(); Thanks @wbmnfktr and @BitPoet - got there in there end!
-
Yes, you're probably right. I do usually use Master for most projects, just working on something that allows for a little more experimentation. I'll try it on another install and see if it is the dev version causing this. Thanks for your assistance (again!) @ryan - don't know if you can think of anything off the top of your head in the latest dev that might cause the issues above? If I can confirm it later in another install I log it on github.
-
Interesting - yes am running the latest Dev version for this project as want to play with the new cookies api ? - shouldn't be an issue should it? Unless something has been changed/deprecated?
-
Nope, gives the same error: Fatal Error: Uncaught Error: Class 'Wire404Exception' not found in...
-
You're my guru today! Lol! ? Yes have seen this guide and have used segments loads of times. I know the script it working and breaking at the right places because if I drop the throw new PageNotFoundException(); call and just echo out a message instead it works fine. It's just the 404 call that seems to error. Doesn't seem to be able to find the class. Here's the snippet if it helps: //URL Routing for category pages and tags if($currentTemplate == 'category') { ################################################### ## Routing only required for category and tag pages ################################################### //Segment 1 == category/sector $currentCat = $sanitizer->text($input->urlSegment1); //Segment 2 == content tag e.g. marketing $currentTag = $sanitizer->text($input->urlSegment2); //Check requested category exists (in hidden categories structure) //404 if not, otherwise continue rendering page $catPage = $pages->get('/categories/')->children("name=$currentCat,include=hidden,limit=1"); $catPage = $catPage[0]; if(!$catPage->id) { throw new PageNotFoundException(); } } Probably doing something stupid.
-
I'm using URL segments to pull some dynamic content into a page. The template uses the URL segment variable to check the content exists in another part of the site tree, if not I'm trying to throw a 404. Looking at other threads on here I think the below should do the job. throw new PageNotFoundException(); But I'm getting the following error: Fatal Error: Uncaught Error: Class 'PageNotFoundException' not found in... Is anyone able to shed any light on how I'm using this wrong? The code is currently in an include which seemed to have previously triggered some debate, but I get the same error even if I move it to the top of the parent page. I've also created a plain 404 template that doesn't include any other template elements just to rule out a code loop.
-
Sorry for keeping you in suspense... but crazily I can confirm this works! Thanks for your help ?
-
I will do - is this a known issue then?
-
{ name: 'Left Aligned Photo', element: 'img', attributes: { 'class': 'float-md-left img-fluid' } }, { name: 'Right Aligned Photo', element: 'img', attributes: { 'class': 'float-md-right img-fluid' } }, { name: 'Centered Photo', element: 'img', attributes: { 'class': 'd-block img-fluid' } }, This alternative set of Bootstrap classes works fine - can't figure out what the common denominator is of the ones that don't work. It also doesn't seem to like more than 2 classes, not sure if there's a limit to the length of the attribute strings?
-
Hi all, Having a strange problem with my CKeditor custom styles. Trying to add standard bootstrap classes to the image alignment options. But for some reason if I add multiple classes to the centred image option it disappears from the editor drop down. But with only one class it works. So this works: { name: 'Left Aligned Photo', element: 'img', attributes: { 'class': 'float-md-left img-fluid' } }, { name: 'Right Aligned Photo', element: 'img', attributes: { 'class': 'float-md-right img-fluid' } }, { name: 'Centered Photo', element: 'img', attributes: { 'class': 'img-fluid' } }, But this doesn't: { name: 'Left Aligned Photo', element: 'img', attributes: { 'class': 'float-md-left img-fluid' } }, { name: 'Right Aligned Photo', element: 'img', attributes: { 'class': 'float-md-right img-fluid' } }, { name: 'Centered Photo', element: 'img', attributes: { 'class': 'w-100 img-fluid' } }, Note the slight difference to the last line. I've tried escaping the hyphens in case it was that but doesn't help. Any ideas.... #puzzled!
-
Fully didn’t know about this method - really useful thanks.
-
Perfect thanks - so simple!... I had tried basically every combo of conditionals and was beginning to think it wouldn't work!
-
Pretty much as the title - does anyone have a snazzy way to make a field that doesn't yet have any content front-end editable? Currently, the field cannot be double-clicked if empty but I would like to give users the ability to add missing content to a few specific fields.
-
MarkupSEO - The all-in-one SEO solution for ProcessWire.
JayGee replied to Nico Knoll's topic in Modules/Plugins
ha - great work on this - love the PW community! ? I've tried dropping your branch of the module into one of the affected sites but it doesn't seem to have fixed it ?. Bit puzzled, as I'm almost certain things were working fine on all these sites previously. -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
JayGee replied to Nico Knoll's topic in Modules/Plugins
I'm guessing the main repo as we usually install via the CMS module installer. Does this sound like something that has already been addressed then? -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
JayGee replied to Nico Knoll's topic in Modules/Plugins
Hi all, we've started experiencing an odd problem where this extension has stopped auto-injecting the meta tags into some sites. The manual tag insertion still works. I can't work out the common denominator - has anyone else experienced this? -
How to allow image upload in configurable module form?
JayGee replied to JayGee's topic in Module/Plugin Development
Thanks to everyone who was helping me the other night. A little update on what I ended up doing with my helper module so far.... For the site settings, I ended up just making a configurable module with only one field containing a load of defaults stored as a simple JSON array. I thought this would be far easier for my specific purpose as it means that it's easily customisable with new data on a site-by-site basis without having to update the module interface or add new fields. I've hooked the $page object to access this data on the front end, so I can now do <?=$page->siteSettings['company_name'];?> etc in my templates which is cool. I've also set some dependencies in the config for the modules we regularly use. I have also used a hook to inject an overlay 'edit mode' icon that displays on the front end whenever an editor is logged into the site, as we've found some people don't realise when they're logged in and can use the front-end editing on their site. The little cog icon also links back to the PW dashboard. Really starting to get the hang of how the PW modules work now, so will be adding in lots more useful stuff we tend to use for every project in due course. ?