-
Posts
807 -
Joined
-
Last visited
-
Days Won
10
Everything posted by kixe
-
Welcome to the forum celinem01. Language alternate field values doesn't exist for fieldtype file (or image) but for Text Fields. Create a simple Textfield of type the textLanguage where you store the name of your language specific image. Name it for example 'langImage'. In the template you can use it <img src="/path/to/image/{$page->langImage}"/> If you use the same images in different projects you can do it like this. Put a translatable string in your template $img_file_name = __('filename.png'); <img src="/path/to/image/$img_file_name"/> Now you can create a translation for this template file. Description here:
-
@ Ivan Thats not true. Now you cannot use any field of the parent page to generate the name. Only the generation from date function is possible now. Try it out! But with my solution you could use all the parent page fields + date + some string in the order you want it. This is obviously more + inclusion what we have. About title: Now you get, whatever you defined in the setting the title 'untitled' or a title generated from date which you maybe want to overwrite anyway! No other possibilities until now! Maybe I understoud you completely wrong, or you my solution. Have a look in github.
- 100 replies
-
- 2
-
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
-
@Ivan Yes, the title is generated and the name too, as a derivation from the title. (have a look at the system notice on top of the screenshot) Derivation works completely in the same way, if you add a page manually and type in the page title. I think thats what most user would expect. You have read the post, where I described, how it is working actually (link in the first post of this topic). This way seems to be unlogical to me.
- 100 replies
-
- 1
-
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
-
As described in this post (https://processwire.com/talk/topic/8551-custom-urls-for-pages/?p=82742) the option 'Name Format Children' under the tab 'Family' in template settings doesn't work properly and also not as expected. I had a look inside the code and made some changes which are working properly, which offers much more options, more consistency and less code too. The result is the following. You have 3 Options for generating name and title, which could be combined in endless variations. Name is always derived from title, same like creating pages manually. type date: if function detects # character anywhere in the string, conversion will be: deletion of # and string will be used as format parameter for PHP date() function type field: if string is a fieldname of the parent page the value of this field will be used type string: if string doesn't fit to the 2 preceeding it will be taken as it is All parts (separated by comma) will be composed in the order of setting. You can use unlimited numbers of parts I made a pull request on github: https://github.com/ryancramerdesign/ProcessWire/pull/831 Example screenshots Setting ... will result in
- 100 replies
-
- 10
-
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
-
What about modules in processwire? Everything safe? Maybe we need a tag [security-checked] given by an accredited team of PW developers.
-
@kcnpxcp Welcome to the forum. If you create a new page from the page field you have to change the name later under the tab field settings. If you have only a few tags its easier to create them manually and add them to your fieldtype page. You can also create pages from API within a template: $pages->add($template, $parent, $name); In this case title will betaken from name. Does this help? @owzim This option doesn't work by creating a new page via fieldtype page. Furthermore Name format for children is still under development and doesn't work properly. Look here: https://processwire.com/talk/topic/8551-custom-urls-for-pages/?p=82742
-
About "Name format for children" option This option is still in development and not very well correct described (doesn't work properly too) Until now you have 3 options: If you type 'title' (without quotes) in the setting field you will get a page title 'untitled', because there doesn't exist a title if you autogenerate the page. from the 2nd page up you will get the title 'untitled-[n]' whereas n starts counting not at 1 but at the total number of sibling pages under this parent name is always date('Y-m-d-h-i-s') example '2014-12-15-04-10-30' If you type any other character than these (-_ a-zA-Z0-9) you will get a string generated with the date() function (sometimes weird stuff) If you type a string with allowed characters (-_ a-zA-Z0-9) you will get this string as a prefix. Same as above with the counter [n] Source of this information: wire/core/Pages.php Line 700 something
-
I don't understand clearly what you want. If you want to create a page by API inside a template you can do this: $p = new Page(); $p->template = 'basic-page'; $p->parent = $pages->get(1); $p->name = date('Ymd').'-my-url-title'; $p->save(); to get a page with a specific name use: $pages->get('20141214-my-url-title'); //or $pages->find('20141214-my-url-title'); Does this help? If not please explain more clearly what you want to do.
-
In your function you are just asking for the total number. If you need only this thats easy done. $pages->get('name=posts')->numChildren; more options http://cheatsheet.processwire.com/page/built-in-fields-reference/page-numchildren/
-
Language Support: auto create blank translation files
kixe replied to Nico Knoll's topic in Wishlist & Roadmap
This Topic should be marked as answered. Video Tutorial By the way before this option was implemented in core you could enable it by installing my LanguageTranslatorPlus Module which exists since 10/2013. -
module doesn't uninstall properly. put issue notes on github. If possible for you and not annoying for people using this module I would really recommend to rename your module since it doesn't generate fields at all. What about ProcessValueGenerator or ProcessRandValueGenerator.
-
¯\(ツ)/¯ nice one
-
Are you sure you are talking about the same thing? @toothpaste Do you mean this? http://jqueryui.com/sortable/ or that? <form action="{$page->url}" method="post"> <select name="muzikanten" onchange="this.form.submit()"> <option value="A">Muzikant A</option> <option value="B">Muzikant B</option> <option value="C">Muzikant C</option> </select> </form> or both? @JanRomero urlSegments are nicer than raw GET parameters.
-
very silly! switching around with fields I tested in a field with diabled textformatter. Everything works as expected. @Martijn: finally 9 because it has a flat rooftop. But you are right to use PW it is necessary to be able to count until 8 (or maybe 9)
-
doesn't work https://www.google.com/maps/place/The+Great+Pyramid+at+Giza/@29.9797402,31.1351772,17z
-
The $page object is an instance of the current page, which you are viewing, whereas $template object is an instance of the template itself.
-
Super nice module. Awesome. Got some Notices, just to no. Notice: Undefined variable: field in /site/modules/FieldtypeOpenWeatherMap/FieldtypeOpenWeatherMapConfig.php on line 16 Notice: Trying to get property of non-object in /site/modules/FieldtypeOpenWeatherMap/FieldtypeOpenWeatherMapConfig.php on line 16
-
Thats a question of philosophie. This module creates a page with a process field (which calls the module). This module hooks in ProcessPageListRender Changing the page status is a process In a way you are right: this module is not a process itself, but it executes one. Any suggestions for a better name? Something like HookProcessPageStatusToggler.module? I am often thinking about a straight naming syntax for modules. I have no idea ...
-
@Soma no we don't. @Martijn Geerts Its already done. I updated it and included lock/unlock button too. @kongondo When I started with the module I didn't know about the one from geniestreiche. I startet on the base of Nicos ProcessPageDelete.module. I will not put it in the modules directory. I am open to merge the results with geniestreiche. Sent him a message.
-
made some changes. Implements now publish/unpublish button too. Enable/ disable buttons via modules settings. @adrian Thanks. I changed this.
-
@kongondo. I saw that coming but didn't search enough in the growing modules directory.
-
It doesn't require LazyCron. Thats a copy paste bug . Thanks Adrian for the comments. I put it quickly together. Polishing will come soon. Thanks
-
New Module which adds 1 more, but very tiny green buttons to the page list. It saves minimum 3 klicks to change page status from hidden to visible. Edit: update 11.12.14 Module provides up to 3 (more) buttons in page list to toggle status (hidden/visible, published/unpublished and locked/unlocked). Enable/Disable the buttons in the settings (screenshot) ProcessPageStatusToggler.module
-
Welcome ChadD. Did you check these modules? http://modules.processwire.com/modules/markup-twitter-feed/ http://modules.processwire.com/modules/social-twitter-update/ http://modules.processwire.com/modules/markup-social-share-buttons/
-
Thanks for the quick help.