-
Posts
1,465 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Peter Knight
-
Just curious but why do you have a separate page for the reverse side? What you could try is having a single page and enable tags on your image fields. You can then create a selector to call any image with the tag of 'reverse" etc. just started using image tags here recently and in some cases has reduced my pages and templates significantly.
-
Was browsing the cheatsheet trying to pickup some new selector tricks and noticed the next all siblings selector. $page->nextAll($selector, $siblings) Introduced in Version 2.0 Description Return all sibling pages after this one, optionally matching a selector. $selector Optional selector string. When specified, will filter the found siblings. $siblings Optional siblings to use instead of the default. Based on the description above, should the following not return a pages siblings? <?php $solutions = $page->nextAll($siblings); foreach ($siblings as $solution){ echo " <a href='{$solution->url}'>{$solution->title}</a> ";} ?> It works if I drop the nextall and refer to siblings without the variable $ <?php $solutions = $page->siblings; foreach ($solutions as $solution){ echo " <a href='{$solution->url}'>{$solution->title}</a> ";} ?> Just curious really.
-
Morning (in my part of the world) I want to manually add a usemap to an existing image in CK Editor turning this: <img alt="" src="/site/assets/files/1151/diagram.gif"> into this <img usemap="#diagram" alt="" src="/site/assets/files/1151/diagram.gif"> When I save my page, the usemap is being stripped out. Having experimented with Content Type, ACF and HTML Purifiers and then investigating the Image field itself, I'm not having much look. A search for the forum and Google turns up nothing. As I am porting across a 6 year old MODX site, I wondered if ImageMaps are no longer really used or am I overlooking a setting?
-
Page field: select from a large number of pages
Peter Knight replied to HerTha's topic in Getting Started
Ohh that's nice. Hadn't seen this module before and it has a search too! -
Page field: select from a large number of pages
Peter Knight replied to HerTha's topic in Getting Started
Had a similar issue recently and tried a few of the Auto complete solutions for some client projects. It's worth mentioning that auto-complete only works effectively when editors know in advance the name of the page they need. This isn't always the case. What I'd love to see is a hybrid of the two. Ie a page select field where you can browse a tree AND search too. -
Adrian This should work for displaying the cover of a PDF in ListerPro? I'm using ListerPro to list a virtual directory of PDFs. Essentially each PDF is a page with a Files field. I drop my PDF in there and then use ListerPro to display the following I'll try it tomorrow but thought I'd check first. Unfortunately, I already have my File and Images fields named so that may affect things?
-
PDF files as single Pages (Virtual file repository)
Peter Knight replied to Peter Knight's topic in Getting Started
Hi Martijn The PDF pages open as PDFs without applying this. Probably because in CK Editor I am linking to a page and then selecting a file attached to that page. I imagine forcing the PDF extension is mainly used when I am calling a PDF page with an echo statement? -
PDF files as single Pages (Virtual file repository)
Peter Knight replied to Peter Knight's topic in Getting Started
Love ListerPro. Will definitely use it and it would allow me to use columns for last updated, modified by and even short descriptions of files etc -
Working on a site at the moment with lots of PDF downloads and was wondering how you handle these? In my ProcessWire projects so far, each PDF has generally be restricted to a single page. I normally create a field called Files and reference that in any CK Editor links. The problem I realised is that when one of these PDFs needs replacing, my client needs to remember every page where the PDF is referenced. With this site I'm currently building, I have multiple pages referencing the same PDF(s). In the CK Editor modal for linking files, I can of course choose a different page where the file "lives". I'm starting to wonder though if I should create a virtual Files directory which would simply be a container page with each sub-page representing and named after a file. This way, when my editors need to replace a file, they just need to replace and update in a single location. Any known cons of doing it this way?
-
Confirmed - this is an "issue" with PTExtended. On PT, the icon is once you hover over the row. Mine wasn't displaying as the field was caching some PTE settings.
-
Finally got round to trying PageTable tonight and really liking it so far. A tiny thing I notice is that although the rows are sortable, there's no Sort Handle icon at the beginning of each row. Is this an error in my setup or simply how things are right now? For example, here's a Repeater field with multiple, sortable rows. Notice the drag icon. And here's an example of a PageTable rows (no icon)
-
Hey @TDH Did you get sorted for your image problem?
-
Guys - you're right. Problem at my end with my list items and formatting didn't help.
-
@Soma Have you plans for an active/here class? It's different than the current class as it's applied to the parent list items In MODX Wayfinder, this was called the &hereClass &hereClass CSS class for the items showing where you are, all the way up the chain. CSS = .active So if I was currently on a page called Pluto below, the active classes would be applied as follows... Nature Geography Astronomy (active) - Solar Systems - Planets (active) - - Mars - - Pluto (current) - - Venus - Black Holes
-
Is your image field exactly named my_imagefield ? And is your image field limited to a single image?
-
I eventually built my own. Actually, Kongondo helped me somewhat. All I needed was posts tags categories comments As I needed much finer control over the markup and templates, it was straightforward to build these natively with PW using regular pages and the Page select fields etc. Is that an option for you?
-
Have you tried Kongondos blog module?
-
@Soma That's what I needed. I hadn't tried those two in conjunction with each other.
-
Multiple editors editing at the same time
Peter Knight replied to alexcapes's topic in General Support
Good luck with it. In my experience, companies like this tend to make decisions on whats currently available, what fits around their process and whats least likely to disrupt their complex workflows. And rightly so but maybe you could flag that sometime before the end of the year that this functionality will be available.- 6 replies
-
- roles
- multiple editors
-
(and 1 more)
Tagged with:
-
Hey Mr-fan That occurred to me (pages as single images) and would have a few benefits in this project. I might even go down that route as the portfolio grows. Was thinking too that I could use Lister pro then as a kind of Images manager. Kind like what Soma is doing with his setup. Otherwise, I was just putting it out there that it's be a nice idea? Probably not easy or quick to refactor in terms of the core but would be a nice addition.
-
Short version Can we make the Page fieldtype as the tagging engine for images? Long version / real example I started using image tags for the first time after reading making efficient use of fields in PW. There's a part titled Use multi-file fields to replace several single-file fields where Ryan mentions tagging. As I was building a site for an interior designer, I needed an almost identical setup and to tag images with a gallery with "basement", "living room", "garden" and "kitchen" tags. At one stage, my client wanted "basement" changed to "basement and garden" and I had to manually edit about 15 images. No big deal really but it doesn't seem very scalable. Having used the Page fieldtype for tagging blog posts and news and experienced how easy it is to make global tag names changes etc, I wondered if the Page fieldtype could be put on the roadmap as the tagging engine for images or at least as an option.
-
@Pete Just wondering if there was a reason that a members previous posts are capped at X months? IE if you visit your profile and search for Posts or Topics, there's not a complete archive. is this to save CPU and database resources?
-
I'm due a trip to London this summer. Nothing set yet but I'd love too to meet other PW users and have a beer.
-
I'm late getting back to this Just to recap, I have a side navigation bar. For the purposes of explanation, if it was completely expanded (which it never is), it would look like this ProductsRockets Spacecraft Submarines StaffEngineering TeamAlan John Miriam Ballistics TeamPhil Tracey Liam Strategy & Planning TeamPeter Adrian Mary LocationsMoonStation Lunar Station Solar EarthUSA Germany Ireland France England The menu correctly displays as Products Staff Location with 'max_levels' => 1 However if I was to send someone a direct link to a level 3 page ( Staff > Ballistics Team > Tracey) then I want the side menu to display that page, all level 3 siblings (Phil, Tracey and Liam), it's level 2 root pages and it's level 1 parent(s) Products StaffEngineering Team Ballistics TeamPhil Tracey Liam Strategy & Planning Team Locations As mentioned by mar-fan there has since been options added for selector_leveln properties but I'm not sure if thats what I need? added support for nav_selector property/field and selector_leveln (new in 1.2.1) Here's my working menu which has 'max_levels' => 1 <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'parent_class' => 'parent', 'current_class' => 'current', 'has_children_class' => 'has_children', 'levels' => true, 'levels_prefix' => 'level-', 'max_levels' => 1, 'firstlast' => true, 'collapsed' => false, 'show_root' => true, 'selector' => '', 'selector_field' => 'nav_selector', 'outer_tpl' => '<ul class="sidelist">||</ul>', 'inner_tpl' => '<ul>||</ul>', 'list_tpl' => '<li%s >||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}">{title}</a>', 'item_current_tpl' => '<a href="{url}" >{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<a href="{url}">{title}</a>', 'xitem_current_tpl' => '<span>{title}</span>', 'date_format' => 'Y/m/d', 'code_formatting' => false, 'debug' => false ); $root = $page->rootParent; // Start from the top root parent of current page echo $treeMenu->render($options, null, $root); ?> Thanks guys.
-
I know this is an old thread but I needed a back and next link for a template and the solution here was great. I know it's not very process-wirey but I just hide the previous and next link if there is no previous and next page. <nav> <ul id="prev-next"> <li> <a class="<?=$page->prev->id ? 'previous' : 'no-before'?>" href="<?php echo $page->prev->path; ?>"> <strong><</strong> <?=$page->prev->title?> </a> </li> <li> <a class="<?=$page->next->id ? 'next' : 'no-after'?>" href="<?php echo $page->next->path; ?>"> <?=$page->next->title?> <strong>></strong> </a> </li> </ul> </nav> and then ul#prev-next { margin:0; } #prev-next li{ display:inline; list-style:none; } #prev-next a.no-after { display: none; } #prev-next a.no-before { display: none; } #prev-next a.previous { margin-right: 1rem; }