-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
I think it is a forum board specific thing. It seems this forum board does not have that feature enabled.
- 14 replies
-
- Trash pages
- user
-
(and 2 more)
Tagged with:
-
InputfieldSelectMultiple: How to set "selected" for <OPTION>?
kongondo replied to Valery's topic in General Support
Read more here http://processwire.com/api/multi-language-support/code-i18n/ There are differences when working in a class versus in a template file... -
InputfieldSelectMultiple: How to set "selected" for <OPTION>?
kongondo replied to Valery's topic in General Support
$tagSelectField = $modules->get("InputfieldSelectMultiple"); $tagSelectField->label = __("Tags:");//note the translation string change from your original code $opts = $pages->find('template=tag, include=all'); foreach($opts as $opt) { $tagSelectField->addOption($opt->id, $opt->title); } $tagSelectField->attr('id+name', 'recipeTags'); $form->apend($tagSelectField); Edit. There might be lots of tags though...so you might want to use a different inputfield, maybe autocomplete...But don't know if autocomplete will work in the frontend! -
InputfieldSelectMultiple: How to set "selected" for <OPTION>?
kongondo replied to Valery's topic in General Support
@Marcus, Answered here: https://processwire.com/talk/topic/4646-inputfieldselectmultiple-how-to-set-selected-for-option/ -
Add user filter to inputtype page field selector
kongondo replied to gebeer's topic in General Support
Try this in the 'custom php code input' $author = wire('user')->id; return $pages->find("template=server, created_users_id=$author");- 6 replies
-
- 4
-
-
- user filter
- page
-
(and 2 more)
Tagged with:
-
OK, I have gone ahead and customised Batcher to do this. Almost ready but there are a few kinks (js/css). The 'Tag' action is hidden on load (similar to Change Parent) but it is not hidden on selection of a different option; js is not my forte. PW API side works fine although you may want to limit the number of pages you apply batch tags to. You can apply single or multiple tags. There are also some hard-coded things in there that you might want to change such as the name of your 'tags' field. Just search for @@kongondo in the ProcessBatcherExt.module and ProcessBatcherExt.css files for changes I added. Feel free to do with it as you please BatcherExt.zip
-
I don't think there is a currently a module that does this but you can easily build a simple Process Module to do this. It can either be based on Batcher (i..e. copy its code, rename it and customise to your needs) or see how similar things are done in Blog (see the posts dashboard - both quick post and bulk actions). Start building something and the forum will be here to help you Btw, are you tagging with existing tags or creating tags on the fly or both?
-
@toothpaste, Yes it is possible using PW access settings (permissions and roles). However, by removing Authors and Tags, is it really still a Blog? . Also, when you render posts in the frontend you won't be able to hide author names attached posts.
-
@Creativejay, Did you try my option 2 suggestion above? I tried it and it works brilliantly (tested on lightning.pw so can give you access before the test site expires) .
-
Update: Blog version 2.0.2 committed to master branch and PW modules directory and changed status to stable.
-
That's why you have the 4 options ...to suit the structure you want....Use option 2 if you want posts as children of Blog. That will give you /home/blog/mypost/
-
To be honest, I have read this a couple of times (as well as Diogo's explanation) but I still don't get what you are trying to achieve . I am not even sure whether we are talking backend or frontend. Maybe a diagram? Then again, I am just slow that way . Or if possible, set up a free 7-day dummy/test ProcessWire website on lightning.pw that we can have visualise....Just a thought...
-
Just curious why you need the image file name? I think you can get that using echo $page->BatteryPicture->name. If what you want is an image caption, then give your images description and echo those out with echo $page->BatterPicture->description. Both code here assume you are referring to the image on the page that is currently being viewed.
-
Quick update: Over the weekend or early next week merging Blog 2 to master and changing status to stable in the modules directory.
-
Allan, A couple of things: What version of Blog did you install? I don't know if you are aware there are two version 1.3 and 2.0. I speak about the latter in a couple of posts above. It will soon become the main version. If you installed version 2.0, which 'blog structure/style' did you install? You want to use the blank profile to test Blog. As for the 'double' rendering issue read this post. You probably did not install the blank profile? What you should see, after also copying the /css/ and /js/ that come with Blog to your templates folder is something like this. I repeat here that what you see is only a demo. It is up to you to design Blog to look just the way you want. If you need something that is (almost) ready out of the box (design-wise), then you are better of with the Blog Profile. If you want to design the look of your Blog from scratch plus get some additional features, then use Blog (module) . If using Blog 2.0, read up on install instructions above If you want to make best use of Blog, read the docs/tutorials here.
-
It's all here: http://processwire.com/docs/tutorials/default-site-profile/ http://processwire.com/docs/tutorials/how-to-structure-your-template-files/
-
Working fine now...
-
Is FTP down? Can't connect, no errors (new site)
-
What module is this? RSS Feed Generator?
-
@Creativejay, I don't see any easy way to do this out of the box. If I get you correctly, you have two options one of which I doubt will work well. Option 1. Similar to what you attempted, change the template 'blog-posts' to allow children that use your other extra 'blog-post' templates, e.g. 'blog-post-a', etc. This will work fine with renderPosts() [a MarkupBlog method] since you can pass it a PageArray of your posts irrespective of their templates. The only problem for you is that renderPosts() will not render your other custom fields since it doesn't know about them. So, this option is pretty much dead in the water unless you customise MarkupBlog's code OR separately echo out those fields in your template file. In addition, your posts that use other custom templates will not be visible in the Blog dashboard (ProcessBlog). Option 2. Add your custom fields to the template 'blog-post' and use the module 'Page Edit Field Permission' to hide your custom fields as relevant to your Posts types A - D. In your template files, you will need to echo your custom fields separately from renderPosts(). I think I would go for this option since it requires the least work and you only have 1 template to deal with..In your template file you would only echo out your custom fields if they were not empty. Both options will survive an upgrade since Blog doesn't recreate fields, templates, etc when you update the module. Update: I have just seen your update. Don't know much about FormBuilder so can't comment if your method will work...
-
Session variable getting lost after $session->redirect()
kongondo replied to thetuningspoon's topic in API & Templates
Always nice to see some code.... -
He's probably creating one right now as we speak....
-
@Tommy, Just to clarify, by not working, you mean the user 'Philip' is NOT able to edit his designated page(s) or do you mean he is ABLE to EDIT everything, i.e. including stuff he shouldn't? The only other thing you need to follow are the notes describing the "What they can view" and "What they can edit" sections, e.g. the lines starting 'Focus on pages...' If you've followed these and it still doesn't work, sure, PM me some credentials to check it out but clarify 'not working' as well