-
Posts
21 -
Joined
-
Last visited
Posts posted by Aleksey Popov
-
-
Sorting pages by Views and Popularity? How to?
Thanks. -
2 hours ago, kongondo said:
Sorry for the late reply @Aleksey Popov,
If you mean sort the displayed table on the fly, then that's not possible currently. If you mean one off sort for the field in respect to how it retrieves pages for building the rows of the matrix, then you do this in the field's settings. See the details tab when editing the field. For instance, if using a selector, you would do it as shown below:
I hope this answers your question. If not, please let me know.
Thanks a lot! I tried to do this, but using the table, as in the instructions, it did not work, I will experiment a little later. But for myself, I made a solution (simplified here) like this that works:
<? php $output .= ""; $items = priceTable(pages()->find("template=page-lang, sort=sort") foreach ($items as $item) { $matrixRow = $matrix->find("row={$item->id}"); $output .="<div class='row py-1 border-bottom font-xs-sm'>"; $output .= " <div class='col-4 language'> <a class='link text-danger' href='{$item->url}'>{$item->title}</a> </div>"; foreach ($matrix->find("row=$item") as $value) { $output .= "<div class='col price text-right'><strong>$value->value</strong><small class='d-none d-md-inline'></small></div>"; } $output .= "</div>"; } return $output;
-
This is a very useful module for me! But I can't figure out how the rows are sorted. When the example table is displayed, it appears sorted by name. But I need to sort it like in the admin tree or by titles, for example. Is it possible?
-
4 hours ago, ottogal said:
But if there's no need for more than a few different categories, why not use an own template for each category? (And make benefit of the family settings).
Hi ottogal
The main idea was to prevent mistakenly added pages into wrong categories by customers. And minify similar templates amount in general. But anyway I have not too many templates (less than 12) so I decided finally to add template pairs for each group to get better flexibility in further. -
Hi! Is it possible to specify explicitly the parent section when creating a new child page with a single template?
The idea is to save the user from the possibility of mistakenly choosing a section, but not to create unnecessary identical templates
What I mean:
Let's say I've got 2 parent categories with names articles & news. Each of them utilized the same admin-template (category) with the category.php file. Also, I have 2 different templates for child pages (article & news).
Next, I need to add an article page to the articles category with the "create new" button in admin. At that moment, I must choose the category to place (because both categories use the same template).
To runaround this (and create a page right into the exact category without the choosing step) I should create 2 templates for each category, and setup parent-children relations for each pair of templates, right?
But Is any way to use only the one category template and different children templates and at the same time, explicitly specify which section to use for child pages, thereby removing the process of selecting a child section?
articles (category.php) Article page 1 (page-article.php) Article page 2 (page-article.php) Article page 3 (page-article.php) + Add a new article page here without category chooser news (category.php) News page 1 (page-news.php) News page 2 (page-news.php) News page 3 (page-news.php)
Update: found module but I can't get it work.
-
Hello, SUBJ
1× PHP Warning: Illegal string offset '_width' in .../www/wire/core/Pageimage.php:627
1× PHP Warning: Illegal string offset '_height' in .../www/wire/core/Pageimage.php:628
1× PHP Warning: Cannot use a scalar value as an array in .../www/wire/core/Pageimage.php:627
1× PHP Warning: Cannot use a scalar value as an array in .../www/wire/core/Pageimage.php:628
- 1
-
Hello. My name is Alexey, I'm a designer.
So it turned out that I got carried away by ProcessWire and made several sites (links below the post). I have a desire to make template sites for sale on various markets (where possible), as well as on my own site.
I'm clear understand the difference between ProcessWire and WordPress and it's not about templates, but about simple, ready-made solutions that can been easily customized if necessary.
I would like to discuss here the possibility of such activities in particular the rights of modules authors. Consider for example a hypothetical site:
A simple corporate site in which (commercial and non-commercial) modules are used:
- AdminTheme
- BatchChildEditor
- ClearCacheAdmin
- EmailNewUser
- FieldtypeColorPicker
- FieldtypeMatrix
- FieldtypeMultiplier
- FieldtypeRangeSlider
- FieldtypeRepeaterMatrix
- FieldtypeSelect
- FieldtypeTable
- FieldtypeTextareas
- FormBuilder
- ImportPagesCSV
- InputfieldCKEditor
- MarkupSimpleNavigation
- MarkupSitemapXML
- PageEditPerUser
- PageTreeAddNewChildsReverse
- ProcessCustomUploadNames
- ProcessDatabaseBackups
- ProcessExportProfile
- ProcessTemplateEditor
- ProcessWireUpgrade
- TextformatterAutoLinks
- TextformatterVideoEmbed
Obviously the use of commercial modules should be discussed with Cramer (or others) personally but can I use non-commercial ones in the similar projects?
In general maybe this has already been discussed?
——Some of my works of PW:
- 3
-
Aha, thank you. But I've used sitemap template instead. That's simple and flexible.
-
Hello! Thanks for the module and could ask a question how can I exclude pages with certain templates? Or children of?
-
Most of all I'm UX and frontend designer so that's not a problem to make a kind of static js slider.
Of course, this project has a very small amount of site visitors, and I will cache main page and sections. A plain pages I leave uncached.
But it would be ideal if it should be possible to cache entire page and leave only a fragment. This is inverse case to the markup cache module usage.
It just interesting to me to understand the limits of. -
In any case, thanks for the replies. I'll experiment with caching in the future.
-
But what? That's a perfect solution.
Not a PW solution. It always available. And in addition in this case all images must been preloaded or ajax loaded. Right? Again, this is perfect solution but the question rather about caching abilities.
-
Could you use Markup Cache for all parts of the page, except the image?
No, have not tried it yet. Only read about it but if I understand correctly, I have to mark elements in the cache by parts, I'm afraid it will complicate the design and also may potentially cause overload. No?
to Soma — yes but... ))
-
Tell me please, is it possible to cache entire page with the exception of some part of it. For example I need to load a new random image with every new page update but all others parts of page should be cached for months.(may disappear later on a production site)
btw: thanks for all PW developers for engine )))
Sorting pages by Views and Popularity?
in General Support
Posted
Yes! Thanks everybody.