Leaderboard
Popular Content
Showing content with the highest reputation on 03/13/2018 in all areas
-
/contactors/ (contractors.php) bob smith (contractor.php) ... /companies/ (companies.php) acme corp (company.php) ... /jobs/ (jobs.php) 123 main street (job.php) ... /specialities/ (specialties.php) electrical (specialty.php) plumbing welding ... - create a page field (asm) called 'contractors'; assign it to 'company' template (as well as the 'job' template? not sure if that's what you meant) - create a page field (asm) called 'specialties'; assign it to the 'contractor' template - create a page field (single select) called 'contractor'; assign it to the 'job' template I'm not sure if you also need 'specialities' on your contractor template, but you did mention that as well. The approach I outlined is the collection-y way of doing it, like a traditional webapp framework.5 points
-
As a general rule, I find it preferable to avoid relying on parent-child structures and use Page Reference connections instead. I think it's more flexible and future-proof that way. So rather than nesting those things I would create separate branches for them and then connect Job Sites and and Specialities with Contractors using Page Reference fields (in conjunction with Connect Page Fields). I'd use Lister Pro instances to make it easy for editors to find whatever page they are looking for.5 points
-
Latest v1.8.3 further improves checkAllCheckboxes feature. Now its state properly corresponds to individual checkbox changes and also fires a change event (without that showIf fields wouldn't react).2 points
-
Thank you @Zeka and @kongondo It seems as it was my mistake of having enabled Other active languages of the menu after I have added the pages and for some reason the language got the same in both. After disabling the option and reenabling it, I got the tabs for Default and English language texts so it is all good now and switching properly. So to say, it is all working fine for multilanguage site out of the box as far as the person has taken the following steps: 1. Figure out the options array and apply the proper styling to the menu. 2. While rendering the menu, do not call the menu by name but use ID as the simplest thing to do (grab the URL from the menu edit link - id=XXXX where xxxx is the ID. In the instructions it was saying to call the menu using: $menu = $modules->get('MarkupMenuBuilder');// $menu is an example echo $menu->render('XXXX', $options); However thanks to the community and the knowledge sharing here, I figured out how to fix it using the following: $menu = $modules->get('MarkupMenuBuilder');// $menu is an example echo $menu->render(XXXX, $options); 4. In order to enable multilanguage options, just go to Setup>Menu Builder. From there while creating or selecting an already created menu, click on the Settings tab and enable the languages you would like the menu to be translated to from the: Other languages for this menu option. Once this step is completted, every menu option would have separate tabs for every language selected. 5. Test the menu pointing to the website url in different languages, ex. /en/ , /ru/ , /de/ etc.2 points
-
Hi @neosin Are there errors in PW and server logs? There is the similar thread2 points
-
At the moment the only way to achieve this in the Uikit Admin Theme is via javascript route, as described by Lahijani in this thread2 points
-
I have had this module sitting in a 95% complete state for a while now and have finally made the push to get it out there. Thanks to @teppo for his Hanna Code Helper module which I referred to and borrowed from during development. http://modules.processwire.com/modules/hanna-code-dialog/ https://github.com/Toutouwai/HannaCodeDialog HannaCodeDialog Provides a number of enhancements for working with Hanna Code tags in CKEditor. The main enhancement is that Hanna tags in a CKEditor field may be double-clicked to edit their attributes using core ProcessWire inputfields in a modal dialog. Requires the Hanna Code module and >= ProcessWire v3.0.0. Installation Install the HannaCodeDialog module using any of the normal methods. For any CKEditor field where you want the "Insert Hanna tag" dropdown menu to appear in the CKEditor toolbar, visit the field settings and add "HannaDropdown" to the "CKEditor Toolbar" settings field. Module configuration Visit the module configuration screen to set any of the following: Exclude prefix: Hanna tags named with this prefix will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Exclude Hanna tags: Hanna tags selected here will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Background colour of tag widgets: you can customise the background colour used for Hanna tags in CKEditor if you like. Dialog width: in pixels Dialog height: in pixels Features Insert tag from toolbar dropdown menu Place the cursor in the CKEditor window where you want to insert your Hanna tag, then select the tag from the "Insert Hanna tag" dropdown. Advanced: if you want to control which tags appear in the dropdown on particular pages or templates you can hook HannaCodeDialog::getDropdownTags. See the forum support thread for examples . Edit tag attributes in modal dialog Insert a tag using the dropdown or double-click an existing tag in the CKEditor window to edit the tag attributes in a modal dialog. Tags are widgets Hanna tags that have been inserted in a CKEditor window are "widgets" - they have a background colour for easy identification, are protected from accidental editing, and can be moved within the text by drag-and-drop. Options for tag attributes may be defined You can define options for a tag attribute so that editors must choose an option rather than type text. This is useful for when only certain strings are valid for an attribute and also has the benefit of avoiding typos. Add a new attribute for the Hanna tag, named the same as the existing attribute you want to add options for, followed by "__options". The options themselves are defined as a string, using a pipe character as a delimiter between options. Example for an existing attribute named "vegetables": vegetables__options=Spinach|Pumpkin|Celery|Tomato|Brussels Sprout|Potato You can define a default for an attribute as normal. Use a pipe delimiter if defining multiple options as the default, for example: vegetables=Tomato|Potato Dynamic options Besides defining static options as above, you can use one Hanna tag to dynamically generate options for another. For instance, you could create a Hanna tag that generates options based on images that have been uploaded to the page, or the titles of children of the page. Your Hanna tag that generates the options should echo a string of options delimited by pipe characters (i.e. the same format as a static options string). You will probably want to name the Hanna tag that generates the options so that it starts with an underscore (or whatever prefix you have configured as the "exclude" prefix in the module config), to avoid it appearing as an insertable tag in the HannaCodeDialog dropdown menu. Example for an existing attribute named "image": image__options=[[_images_on_page]] And the code for the _images_on_page tag: <?php $image_names = array(); $image_fields = $page->fields->find('type=FieldtypeImage')->explode('name'); foreach($image_fields as $image_field) { $image_names = array_unique( array_merge($image_names, $page->$image_field->explode('name') ) ); } echo implode('|', $image_names); Choice of inputfield for attribute You can choose the inputfield that is used for an attribute in the dialog. For text attributes the supported inputfields are text (this is the default inputfield for text attributes so it isn't necessary to specify it if you want it) and textarea. Note: any manual line breaks inside a textarea are removed because these will break the CKEditor tag widget. Inputfields that support the selection of a single option are select (this is the default inputfield for attributes with options so it isn't necessary to specify it if you want it) and radios. Inputfields that support the selection of multiple options are selectmultiple, asmselect and checkboxes. You can also specify a checkbox inputfield - this is not for attributes with defined options but will limit an attribute to an integer value of 1 or 0. The names of the inputfield types are case-insensitive. Example for an existing attribute named "vegetables": vegetables__type=asmselect Descriptions and notes for inputfields You can add a description or notes to an attribute and these will be displayed in the dialog. Example for an existing attribute named "vegetables": vegetables__description=Please select vegetables for your soup. vegetables__notes=Pumpkin and celery is a delicious combination. Notes When creating or editing a Hanna tag you can view a basic cheatsheet outlining the HannaCodeDialog features relating to attributes below the "Attributes" config inputfield. Advanced Define or manipulate options in a hook You can hook HannaCodeDialog::prepareOptions to define or manipulate options for a Hanna tag attribute. Your Hanna tag must include a someattribute__options attribute in order for the hook to fire. The prepareOptions method receives the following arguments that can be used in your hook: options_string Any existing string of options you have set for the attribute attribute_name The name of the attribute the options are for tag_name The name of the Hanna tag page The page being edited If you hook after HannaCodeDialog::prepareOptions then your hook should set $event->return to an array of option values, or an associative array in the form of $value => $label. Build entire dialog form in a hook You can hook after HannaCodeDialog::buildForm to add inputfields to the dialog form. You can define options for the inputfields when you add them. Using a hook like this can be useful if you prefer to configure inputfield type/options/descriptions/notes in your IDE rather than as extra attributes in the Hanna tag settings. It's also useful if you want to use inputfield settings such as showIf. When you add the inputfields you must set both the name and the id of the inputfield to match the attribute name. You only need to set an inputfield value in the hook if you want to force the value - otherwise the current values from the tag are automatically applied. To use this hook you only have to define the essential attributes (the "fields" for the tag) in the Hanna Code settings and then all the other inputfield settings can be set in the hook. Example buildForm() hook The Hanna Code attributes defined for tag "meal" (a default value is defined for "vegetables"): vegetables=Carrot meat cooking_style comments The hook code in /site/ready.php: $wire->addHookAfter('HannaCodeDialog::buildForm', function(HookEvent $event) { // The Hanna tag that is being opened in the dialog $tag_name = $event->arguments(0); // Other arguments if you need them /* @var Page $edited_page */ $edited_page = $event->arguments(1); // The page open in Page Edit $current_attributes = $event->arguments(2); // The current attribute values $default_attributes = $event->arguments(3); // The default attribute values // The form rendered in the dialog /* @var InputfieldForm $form */ $form = $event->return; if($tag_name === 'meal') { $modules = $event->wire('modules'); /* @var InputfieldCheckboxes $f */ $f = $modules->InputfieldCheckboxes; $f->name = 'vegetables'; // Set name to match attribute $f->id = 'vegetables'; // Set id to match attribute $f->label = 'Vegetables'; $f->description = 'Please select some vegetables.'; $f->notes = "If you don't eat your vegetables you can't have any pudding."; $f->addOptions(['Carrot', 'Cabbage', 'Celery'], false); $form->add($f); /* @var InputfieldRadios $f */ $f = $modules->InputfieldRadios; $f->name = 'meat'; $f->id = 'meat'; $f->label = 'Meat'; $f->addOptions(['Pork', 'Beef', 'Chicken', 'Lamb'], false); $form->add($f); /* @var InputfieldSelect $f */ $f = $modules->InputfieldSelect; $f->name = 'cooking_style'; $f->id = 'cooking_style'; $f->label = 'How would you like it cooked?'; $f->addOptions(['Fried', 'Boiled', 'Baked'], false); $form->add($f); /* @var InputfieldText $f */ $f = $modules->InputfieldText; $f->name = 'comments'; $f->id = 'comments'; $f->label = 'Comments for the chef'; $f->showIf = 'cooking_style=Fried'; $form->add($f); } }); Troubleshooting HannaCodeDialog includes and automatically loads the third-party CKEditor plugins Line Utilities and Widget. If you have added these plugins to your CKEditor field already for some purpose and experience problems with HannaCodeDialog try deactivating those plugins from the CKEditor field settings.1 point
-
The module has been lying around on GitHub for some time now, so I thought I'd give it its own forum topic so I can give it a module list entry. SymmetricEncryptedText Symmetric encryption for text based fields (supports multi language fields). Module page. Link to the GitHub repo. Description This module adds an encryption option to all text fields (and those derived from FieldtypeText). Field contents are encrypted using a symmetric key when a page is saved and decrypted when loaded from the database. The module by default uses sodium (if loaded) in PHP versions >= 7.2, otherwise it falls back to the bundled phpseclib. Multi-Language fields are supported too. WARNING! Setting a field to encrypted and saving values in those fields is a one-way road! Once encrypted, the contents cannot be unencrypted without writing a program to do so. Disabling the encryption option on a field after the fact gets you encrypted "garbage". Usage Download the zipped module through the green button at the top right of the GitHub repo or (once available there) from the official PW module repository Extract in its own directory under site/modules. In the backend, click "Modules" -> "Refresh", then install "Symmetric Encryption for Text Fields". Go to module settings. An appropriately sized, random key will be generated if this is your first use. Copy the supplied entry into site/config.php Add fields or configure already present fields. On the "Details" tab you can enable encryption for the field in question Edit a page with such a field, enter a value there, save and enjoy Existing, unencrypted values are left untouched until a new value is saved. That way, you can do a smooth upgrade to encryption, but you have to save all pre-populated pages to have their values encrypted in the database. Thus it is recommended to avoid adding encryption to already populated fields. Advanced Usage You can hook after SymmetricEncryptedText::loadKey to retrieve your key from somewhere else, e.g. a different server.1 point
-
Hi, So today I will writing a small tutorial on developing templates in Processwire using Twig Template, Processwire is a highly flexible CMS which gives developers/designers/users options and allows easy extension of the platform. So here goes the tutorial What is Twig Template ? Simply put in my own words, Twig is a modern templating engine that compiles down to PHP code, unlike PHP, Twig is clean on the eyes , flexible and also quite *easy* to have dynamic layout site with ease ,without pulling your hair out. Twig is trusted by various platforms. It was created by the guys behind Symfony. Take this code as an example {% for user in users %} <h1>* {{ user }}</h1> {% endfor %} This will simply be the equivalent in PHP World <?php $userArray = ["Nigeria","Russia"]; foreach($userArray as $user): ?> <h1><?= $user ?></h1> <?php endforeach; The PHP code though looks simple enough however, you start to notice that you have to be concerned about the PHP tags by ensuring they are closed properly , most times projects gets bigger and comes complex and harder to read/grasp, and also in PHP you can explicitly create variables in the template making it very hard to read as it grows and prone to getting messy WordPress is a major culprit when it comes to that regard. Have you ever wanted to created separate layouts for different pages and break your sites into different parts e.g Sidebar, Comment Section, Header Section ? the regular approach would be to create individual pages for each section and simply add them as templates for the pages and with time, you can end up having tons of templates, however Twig allows you to easily inherit templates and also override the templates where you can inject content into the block easily. Don't worry if you don't understand the concept, the following parts will explain with an example of how to easily inherit layouts and templates. Layout <!DOCTYPE html> <html lang="en"> <head> {{include("layout/elements/header.twig")}} </head> <body> <div class="container-fluid" id="minimal"> <header id="pageIntro"> <div class="bio_panel"> <div class="bio_section col-md-6"> <h1>Okeowo Aderemi</h1> <h2>{{ page.body }}</h2> </div> </div> <div class="clearfix"></div> </header> <section id="page-body"> <div class="container"> <div id="intro" class="col-md-7 col-lg-7"> <h1>About me</h1> <h2> {{ page.summary }} </h2> </div> {block name="content"}{/block} <a style="font-size:1.799783em; font-style:italic;color:#d29c23" href="{{pages.get('/notes').url }}">Read more articles</a> </div> <div class="clearfix"></div> </div> </section> </div> <footer> <div class="header-container headroom headroom--not-top headroom--pinned" id="header-container"> {{include("layout/elements/footer.twig")}} </div> </footer> </body> </html> This is basically a layout where we specify blocks and include other templates for the page, don't panic if you don't understand what is going on, I will simply break down the weird part as follows: Include This basically is similar to native PHP 'include', as it's name suggests it simply includes the templates and injects the content into the layout , nothing out of the ordinary here if you are already familiar with php's include function. {{ output }} This simply evaluates the expression and prints the value, this evaluate expressions, functions that return contents , in my own short words it's basically the same as <?= output ?> except for the fact that it's cleaner to read. {% expression %} unlike the previous this executes statements such as for loops and other Twig statements. {% for characters in attack_on_titans %} <h1> {{characters}} </h1> {% endfor %} This executes a for loop and within the for loop, it creates a context to which variables in that context can be referenced and evaluated, unlike dealing with the opening and closing PHP tags, Twig simply blends in with markup and makes it really quick to read. I will simply post the contents of both the header and footer so you can see the content of what is included in the layout header.php <meta charset="utf-8"/> <meta content="IE=edge" http-equiv="X-UA-Compatible"/> <meta content="width=device-width, initial-scale=1" name="viewport"/> <title> {{ page.title }} </title> <link href=" {{config.urls.templates }}assets/css/bootstrap.min.css" rel="stylesheet"/> <link href="{{config.urls.templates }}assets/css/main.min.css" rel="stylesheet"/> <link rel='stylesheet' type='text/css' href='{{config.urls.FieldtypeComments}}comments.css' /> <link rel="stylesheet" href="{{config.urls.siteModules}}InputfieldCKEditor/plugins/codesnippet/lib/highlight/styles/vs.css"> <script type="text/javascript" src="{{config.urls.siteModules}}InputfieldCKEditor/plugins/codesnippet/lib/highlight/highlight.pack.js"></script> <script src="{{config.urls.templates }}assets/js/vendors/jquery-1.11.3.min.js"> </script> <script src="{{config.urls.templates }}assets/js/vendors/bootstrap.min.js"> </script> <script src="{{config.urls.FieldtypeComments}}comments.js"></script> <link rel="stylesheet" type='text/css' href="{{config.urls.templates}}js/jquery.fancybox.min.css"> <script src="{{config.urls.templates}}js/jquery.fancybox.min.js"></script> {block name="javascriptcodes"}{/block} footer.php <nav class="site-nav pull-right"> <div class="trigger"> <a class="page-link" href="{{pages.get('/about').url}}"> <span>{</span> About <span>}</span> </a> <a class="page-link" href="{{pages.get('/notes').url}}"> <span>{</span> Journals <span>}</span> </a> <a class="page-link" target="_blank" href="https://ng.linkedin.com/in/okeowo-aderemi-82b75730"> <span>{</span> Linkedin <span>}</span> </a> <a class="twitter page-link" target="_blank" href="https://twitter.com/qtguru"> <span>{</span> Twitter <span>}</span> </a> </div> </nav> There's nothing special here, other than twig simply injecting these fragments into the main layout , the next part is the most interesting and important concept and benefit that Twig has to offer {% block content %}{% endblock %} This tag simply creates a placeholder in which the content would be provided by the template inheriting this layout, in lay terms it simply means child templates will provide content for that block, the 'content' simply uses the name 'content' to refer to that specific block, so assuming we were to inherit this template it would simply look like this. Inheriting Template Layout {% extends 'layout/blog.twig' %} {% block content %} <div class="container blog-container"> <section class="blog"> <header class="blog-header"> <h1> {{page.title}} </h1> <h5 class="blog_date"> {{page.published|date("F d, Y")}} </h5> <br> </br> </header> <div class="blog_content"> <hr class="small" /> {{page.body}} <hr class="small" /> </div> </section> </div> {% endblock %} {% block nav %} <div class="col-md-4 col-xs-4 col-sm-4 prev-nav"> <a href="{{page.prev.url}}"> ← Prev </a> </div> <div class="col-md-4 col-xs-4 col-sm-4 home-nav"> <a href="{{homepage.url}}"> Home </a> </div> <div class="col-md-4 col-xs-4 col-sm-4 next-nav"> <a href="{{page.next.url}}"> Next → </a> </div> {% endblock %} In this snippet you can easily notice how each blocks previously created in the header and layout are simply referenced by their names, by now you will notice that twig doesn't care how you arrange the order of each block, all Twig does is to get the contents for each blocks in the child templates and inject them in the layout theme, this allows flexible templating and also extending other layouts with ease. Twig in Processwire Thanks to @Wanze we have a Twig Module for Processwire and it's currently what i use to build PW solutions to clients https://modules.processwire.com/modules/template-engine-twig/ The Modules makes it easy to not only use Twig in PW but also specify folders to which it reads the twig templates, and also injects Processwire objects into it, which is why i can easily make reference to the Pages object, another useful feature in this module is that you can use your existing template files to serve as the data provider which will supply the data to be used for twig template. take for example, assuming I wanted the homepage to display the top six blog posts on it, TemplateEngineTwig will simply load the home.php ( Depending on what you set as the template), it is also important that your twig file bears the same name as your template name e.g home.php will render into home.twig here is an example to further explain my point. home.php <?php //Get the Top 6 Blog Posts $found=$pages->find("limit=6,include=hidden,template=blog-post,sort=-blog_date"); $view->set("posts",$found); The $view variable is the TemplateEngine which in this case would be Twig, the set method simply creates a variables posts which holds the data of the blog posts, the method allows our template 'blog.twig' to simply reference the 'posts' variable in Twig Context. Here is the content of the 'blog.twig' template blog.tpl {% extends 'layout/blog.twig' %} {% block content %} <div class="block_articles col-md-5 col-lg-5"> {% for post in posts %} <div class="article_listing"> <span class="article_date"> {{post.published}}</span> <h2 class="article_title"> <a href="{{post.url}}">{{post.title}}</a> </h2> </div> {% endfor %} {% endblock %} So home.php sets the data to be used in home.tpl once Twig processes the templates and generates the output, twig takes the output from the block and injects it in the appriopriate block in the layout, this makes Processwire templating more flexible and fun to work with. The major advantage this has; is that you can easily inherit layouts and provide contents for them with ease, without the need of running into confusions when handling complex layout issues,an example could be providing an administrator dashboard for users on the template side without allowing users into the Processwire back-end. You can also come up with several layouts and reusable templates. Feel free to ask questions and any concerns in this approach or any errors I might have made or overlooked. Thanks1 point
-
This is about as far away from what we had as you can get, but this would be brilliant. He has a great series of videos!1 point
-
Oh man, I want the best of both worlds - some of those pimped out Aussie 4WD campers are insane! Kiwis love their off-roading but I've never seen such amazing 4WDs until we went to the top end. Some folks have dropped some serious money on those. Proper go-anywhere Landcruisers with every conceivable mod-con built in. Love it.1 point
-
Hopefully we are still considered too young to be grey nomads, but we actually did that in May/June of last year, although we were roughing it in the back of a 4wd - no RV for us Great adventure through some amazing country!1 point
-
Not at all. My partner and I had three weeks exploring NT's top end last winter and had nothing but good experiences. The Aussie grey nomad idea is genius - that's how I want to spend my retirement.1 point
-
As far as I know, there is no way to change created and modified date in the admin area. The best way is to create custom publish_date or craeate_date fields or use this module http://modules.processwire.com/modules/schedule-pages/1 point
-
@MilenKo There are two routes how you can achieve ML menus with MB. 1. Create separate menu for every language and depending on user language pass different pages for menu render method. 2. Enable additional language for the menu ( Settings tab -> Other active languages for this menu) I think that it is what you are looking for.1 point
-
<div class="row"> <?php $i = 0; foreach ($page->umf_img as $image) { echo "<div class='one-fourth column refs'><img src='$image->url'></div>"; if ($i % 4 === 0) { echo '</div><div class="row">'; } $i++; }?> </div>1 point
-
Wow - that's a depressing start to the day! The nasty side of Aussie culture - fortunately we're not all like that.1 point
-
I think it is always worth treating data modeling in ProcessWire as if it was an Object Relational Database out of the box. Meaning: think abstract first You can even implement your code thinking in OOP if you want to.1 point
-
1 point
-
1 point
-
I've been using this field and appreciated the string of page IDs for PW pages. I'm wondering if instead of converting the ID to a URL before returning it, how about returning an object? So, Instead of $page->AssistedURL returning just a string "/mypage/" (internal) or "http://www.anothersite.com/" (external), it returns the object: // Internal PW page { 'id' => 1234, 'name' => 'mypage', 'url' => '/mypage/', 'httpUrl' => 'http://my-processwire-root.com/mypage/' } // External link { 'id' => 0, // 0 or null 'name' => '', // blank or null 'url' => 'http://www.anothersite.com/', 'httpUrl' => 'http://www.anothersite.com/' // url and httpUrl are the same for external links } // Accessing the data $page->AssistedURL->id $page->AssistedURL->name $page->AssistedURL->url $page->AssistedURL->httpUrl For backwards compatibility, could $page->AssistedURL by itself be a magic method to return the URL as it currently does? By returning relative and absolute links, the same field could be used in multiple situations (eg, on an internal menu, and in an email template).1 point
-
Btw. Yes it works. I use it like @import url("../fonts/fonts.css"); Thank you.1 point
-
Shouldn't that be if ($m->template->name == "pressespiegel"){ ?1 point
-
thanks for pointing me to the github issue. how do you guys keep track of those issues on github? I subscribed once but it was just too much to follow. Is there a way to search pw issues on github properly? or do you use google to search? btw: it is not fixed for me with ajax loaded fields. I added a comment on github.1 point
-
Same. I've been looking for the support forum, but this is the closest I've got.1 point
-
admin page field edit links did the job, still bought the pro fields and they are really helpful as well! Thanks guys!!:)1 point
-
@adrian, thanks for the regex fix! Applied in v0.1.6. When I moved to the deep south I soon found out that a UPS is an essential piece of kit. And the irony is I'm only a short hop from the largest hydroelectric power station in NZ. Why, of course . If you're feeling at all homesick, check out the trailer for this documentary I heard about yesterday: A different kind of backwards...1 point
-
Nice to hear that. I see some parts that could be improved but I think it's usable as it is now.1 point
-
1 point
-
Ok, maybe I was too subtle - by "thoughts", I meant "timeframe for implementing" Honestly not being pushy, just wondering if you are interested in doing shortly, or whether I do need to set up something else. This project has lots of fields with lots of checkboxes and having them all checked will be quite a common need, so it's pretty important for the editor's experience / efficiency.1 point
-
Version 1.8.1 adds Input mask feature and the misaligned bottom save button dropdowns should also be fixed. As for the phone country library for input masks (Cleave.js) I've added the all-in-one library which weighs about 250 Kb. It's not loaded automatically so you'll need to check it in the module settings page if you need it.1 point
-
Hey @Robin S - I am seeing something weird where if I insert more than one code into a block of text. It all looks good until I save the page and then it reloads, and then all the text between the first and last code is highlighted in blue and connected so that's it no longer editable. Can you reproduce? Thanks!1 point
-
Would you mind telling us why? I'm kinda curious. And thanks again for the templates/site-profile. I'm always curious to see how other ppl build their sites "behind the scenes"1 point
-
Don't think this is possible because Table field uses it's own schema and adds a database column per table column, so changing it in the field would change it to all fields it is instantiated. The quickest idea I have to hack around this is to use RuntimeMarkup field and render your custom inputfield using jQuery datatables or something simliar and save it's data in a hidden text field).1 point
-
1 point
-
Hi, would you mind share your offcanvas navigation code? Maybe I can help.1 point
-
1 point
-
You can access a repeater field directly by its name, no need to use $page->template.. So, to get a title field inside a repeater, you just need: $repeater = $page->your_repeater_name; foreach( $repeater as $rep ) { echo $rep->text_field_name; echo $rep->page_reference_field_name->title; //output the title of the page that's referenced }1 point
-
What if you use import? https://developer.mozilla.org/en-US/docs/Web/CSS/%40import Write your common rules in the imported file, import the this file first in each file assigned to a CKEditor, and write the custom rules following the import. If you try it out, please report the result. I've never tested it with CKEditor in ProcessWire but I hope it works.1 point
-
If anyone is interested, I have a new fork of this module available here: https://github.com/adrianbj/MarkupSEO/commits/various-fixes-enhancements It's very much a work in progress, but it includes several bug fixes and lots of new features. Please read the commit log to learn about what's fixed and what's new. At the moment you should not upgrade an existing site (new fields won't be created) and probably don't use it on a live site just yet. It's not well tested at all yet, so use at your own peril I'd really appreciate any feedback on it.1 point
-
This profile can be used as a simple business card or blog. The profile does not use any framework css structure, only styles based on CSS GRID and FLEX. To minimize page loading, I added lazy load for images ( Tupola Lazy Load ). With include functions like: MarkupRegions FunctionsAPI CAN DOWNLOAD FROM THIS LINK: https://github.com/rafaoski/site-grayscale-pw https://github.com/rafaoski/site-min-grayscale-pw Screenshot:1 point
-
Welcome to PW h365! I think you are looking for this module for creating/editing pages in a modal: https://modules.processwire.com/modules/admin-page-field-edit-links/ This module will set up a two-way relation: https://modules.processwire.com/modules/connect-page-fields/ (Not sure if you need it).1 point
-
I really need something like that many times. Perhaps a partial solution is a module based on Textarea that the Inputfield Type is an HTML editor with design blocks. I tried to develop one but since I'm not a "real" programmer, I could not make much progress. Maybe someone who knows how to develop modules in Processwire can do it, it does not seem very complicated. It was based on GrapesJS http://grapesjs.com/ an open source Javascript library and it is very easy to include it in a project https://github.com/artf/grapesjs#usage. Here you can see a working example http://grapesjs.com/demo.html, the library exports the HTML code that can be stored in the Textarea. You just have to include the CSS that the frontend uses to make it work.1 point
-
The correct word is all times, I haven't come across any site builder that allows 100% control over content without creating a mess or even without the need for code, the closest so far I can think of is October CMS which generates a templates from the frontend and allows you to tweak them, but it requires knowledge of Twig or blade (not sure), really this is an important topic you raised, I have a client i tried convincing to try Processwire, but the client wasn't interested in coding and wanted to builder to achieve all their needs. The only thing i can think of is a Builder 100% built around Processwire API(s) meaning, when they create a Page and add content and use modules from builder, at the backend it should replicate the same process like creating a template, downloading the modules but that will be a very difficult task to achieve. However I would be happy to hear what ideas you have and we can research further upon that. so far Processwire is the best CMS platform that's minimal and straight forward but for developers more. ImpressPages comes close to what you have in mind, I will keep an eye on this thread and contribute should i have more information. If this can be achieved I think we can further push PW to clients and have them replace WordPress, at the same time we should be careful we don't create another WordPress in this ecosystem. what do you think ?1 point
-
Thanks, would be interesting to see how your example looks like on the frontend. Maybe you have a screenshot?1 point
-
@Robin S - not sure what you think, but I actually don't think that "View site" really belongs under the user's name. Maybe it should be reserved for Profile and Logout and we should have a "Home" icon over on the left, just to the right of "Access"? Not sure what to do about the Debug option - I don't ever use it so maybe I am biased, but I think the link at the bottom right of the page is enough. I don't feel terribly strongly about this - just some quick late night thoughts , but I do think that some users may struggle to find the "View Site" link - I don't really think I would ever think to look under my username to find it.1 point
-
Updates have been made to this module that hopefully help usage: better CSS styling, improved styling of lists config options added for Help Tab Tab Title Tab Color Tab Icon, or no icon Modal width in px, or if not set, full width Better overall Admin Theme support, incl. AdminThemeUiKit Instructions added to main module screen to prevent confusion Retain ability to run setup again if FieldtypeTemplates is installed after first run1 point
-
Thanks to a request from @Rudy this module now supports "Allowed Roles". This is basically the same as the option in the Page Protector module, but I thought it might be nice here as well. It allows you to limit access when in Protected Mode to a defined list of roles.1 point
-
Another way is to insert it via JavaScript. Note, this example is tested for the default admin theme, not Reno. First place the following in your admin.php file above the require controller line, inside your templates dir: $config->scripts->append($config->urls->templates."admin.js"); Then place the following in a file called admin.js in your templates dir: $(document).ready(function(){ $('#topnav').append('<li><a href="https://example.com/" target="_blank">Example</a></li>'); }); I'm sure the jQuery could be more elegant, but the point is it can be done via JS as well, which I ended up doing for a recent project for reasons I can't remember. In my specific example, I linked it to a Google Doc which contained help documentation for a site.1 point