Search the Community

Showing results for tags 'templates'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • ProDrafts
  • ListerPro
  • ProFields
  • ProCache
  • Form Builder
  • Likes
  • ProDevTools
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 85 results

  1. It's common sense to name things based on meaning -- search, sitemap, home, basic-page / default etc. -- but I'm interested in hearing if you folks are defining / following more specific rules than these. This is something I've been thinking quite a bit lately and unfortunately I feel a bit lost here. IMHO this becomes an important thing especially when you have multiple developers working on / providing support for same projects, which they aren't necessary familiar with. It's one of those things that make it easier for a new developer to jump on board of a project and instantly understand what's happening under the hood (or at least make educated guesses.) So after this (longish) explanation, I'd really love to hear what you think about this subject -- what kind of naming conventions do you apply for your templates and/or fields? (If any.)
  2. Robin S

    This module corrects a few things that I find awkward about the "Add New Template" workflow in the PW admin. I opened a wishlist topic a while back because it would good to resolve some of these things in the core, but this module is a stopgap for now. Originally I was going to share these as a few standalone hooks, but decided to bundle them together in a configurable module instead. Add Template Enhancements A module for ProcessWire CMS/CMF. Adds some efficiency enhancements when adding or cloning templates via admin. Features Derive label from name when new template added: if you like to give each of your templates a label then this feature can save some time. The label can be added automatically when templates are added in admin, in admin/API, or not at all. There are options for underscore/hyphen replacement and capitalisation of the label. Edit template after add: when adding only a single template, the template is automatically opened for editing after it is added. Copy field contexts when cloning: this copies the field contexts (a.k.a. overrides such as column width, label and description) from the source template to the new template when using the "Duplicate/clone this template?" feature on the Advanced tab. Copy field contexts when duplicating fields: this copies the field contexts if you select the "Duplicate fields used by another template" option when adding a new template. Usage Install the Add Template Enhancements module. Configure the module settings according to what suits you. https://github.com/Toutouwai/AddTemplateEnhancements https://modules.processwire.com/modules/add-template-enhancements/
  3. On a new pw 3.0.89 installation of mine I've got a problem with role permissions. The setup is like this: Templates: home, basic-page, text-only, folder All of these have no restrictions in the "family" section and all of them have the same access definitions (see edit-template.jpg below) There is a role "redaktor" that has permission to edit, add, delete, move and also clone pages (see permissions.jpg below). Now, when logged in as a user with this role, I can only choose from basic-page and folder. The text-only template is not available.
  4. I as have been a bit confused for some time about how the "Markup Regions" functionality in Processwire worked. But i have know read a bit more and think that i am getting to grips with it. And Markup Regions is going to be huge. To aid me in understanding Markup Regions better i started to read the Source code for the new "Regular" theme in conjunction with the Blog about the markup regions. It helped me a great deal to understand the basics and more fine details of it. A tip is to open both links and use the Source code of the "Regular" theme while reading the blog post. The Source code: https://github.com/processwire/processwire/blob/dev/site-regular/templates/_main.php The Blog post: https://processwire.com/blog/posts/processwire-3.0.62-and-more-on-markup-regions/ I hope this could help others starting out with markup regions. Just take it slow and read it a couple a times and soon you will see the greatness of markup regions. /EyeDentify
  5. So I am making a front-end dashboard for an internal project, and was curious if it is possible to match 2 pages together based on their title and retrieve the data. To make it more clear: I have two pages "Section A" and "Section B" that each has child pages with names (the specific person) with subpages for their services offered. Section A - John Doe (name=john-doe) - Service 1 - Service 2 - Service 3 - Jane Doe (name=jane-doe) - Service 1 - Service 2 - Service 3 Section B - John Doe (name=john-doe) - Service 4 - Service 5 - Service 6 - Jane Doe (name=jane-doe) - Service 4 - Service 5 - Service 6 What I would like to achieve on the front-end (if it is even possibile), is an output like: John Doe - Service 1 - Service 2 - Service 3 - Service 4 - Service 5 - Service 6 Jane Doe - Service 1 - Service 2 - Service 3 - Service 4 - Service 5 - Service 6 Thinking aloud: use a find to get all pages using the template "service user" and then foreaching through their children (and possibly getting a few field values as well) to output in the front end. The service templates used in the sections vary slightly in which fields they use. <?php $findUsers = $pages->find("template=service-a (and or) service-b,(some how match based on names)"); //if no match exists, output what is available ?> <ul> <?php foreach ($findUsers as $groupedUser): ?> <li><?php echo $groupedUser->title; ?></li> <li><?php echo $groupedUser->service_a_location; ?></li> <li><?php echo $groupedUser->service_a_body; ?></li> <li><?php echo $groupedUser->service_b_location; ?></li> <li><?php echo $groupedUser->service_b_phone; ?></li> <?php endforeach; ?> </ul> Sorry, it is just me thinking aloud, but I was not even sure if it is possible to group them together like that. I was going to have a page for each "section" only displaying that data, but I thought it would be nice to display them all together as an overview for the user.
  6. Just a quick question, I have a function in my ready.php file that creates a new js file inside the "scripts" folder (under templates). Everything is working as expected, however, is it possible for the url to look like www.domain.com/scripts/generated.js ? Currently, the only way I can access it is via www.domain.com/site/templates/scripts/generated.js. Or is there a better place I should be putting these scripts ? I I am trying to use the scripts elsewhere (not on the processwire install).
  7. Guy Incognito

    I'm trying to make an AJAX call from within a template to a php script within my templates folder, but I'm getting a 404 from all URLs. Is there a proper way to directly address scripts within PW templates? I've read it will work in the site root, but I'd rather keep all the code together if possible.
  8. Hello, After doing a deep dive into Processwire over the weekend (better late than never), I'm starting to layout an app to receive a migration of an existing app. I'm sure I'll have several questions, but here's my first: Question: I'm using the _main.php/regions template approach. However, I need to do some ajax calls for some html. How would I tell a page just to include only the needed template/fields? I can probably figure this out, but in the interest of time...Thanks!
  9. Margus Tamm | OnlineExpo

    Hi We need Processwire guru for our project onlineexpo.com. Project is "long term" and constantly evolving. We have Frontend developer, but we don't have backend guru yet. So, if you are interested at work, please contact me at "processwire@onlineexpo.com" and let's discuss about conditions. Margus
  10. mwjt42

    How do you include fields in Twig templates? Tried using {% $page->Title %}, but that creates an error. Thanks
  11. Hi Guys, I recently have received a client who has various page layouts. I wanted to give them the ability to simply add their HTML into a body field with CKEditor to allow HTML customization. However, the client isn't very familiar with HTML. This has left me to build a template that has multiple of the similar field types. The thing is, I cannot use the repeater since I cannot repeat lets say an image for repeated item 1 and only body field for repeater item 2. Therefore, I have to literally add 15 fields for them to totally be able to edit the page without issues. What are your thoughts on this approach? Also, I have to name the template according to what it contains, so I was thinking of using numbers instead of words. Reason being, numbers can describe the amount of title fields, body fields and images. Therefore something like, 3-3-2.php or three-three-two.php I have never run into a situation where the client needed so many fields. I was always able to get around it with repeaters etc. Thoughts?
  12. I've a template which basically consists of some fields (imgs,urls etc..). after loading page all data is coming and showing in "posts.json" file which is perfect, issue is title link and and image link is not in the format this is my json code for exporting the page data $getTags = $page->get("template=tags_template, include=hidden")->children("sort=title"); $json = array(); foreach($getTags as $tag){ $json[] = array( 'title' => $tag->title, 'tag_url' => $tag->url, 'tag_img' => $tag->categorythumb->url ); } file_put_contents('posts.json', json_encode($json)); and this is what i'm getting in .json file { "title":"food and drink", "tag_url":"\/en\/discover\/food-and-drink\/", "tag_img":"\/site\/assets\/files\/1471\/" }, see the output , title is fine. But links are not formatted should be like this http://10.50.200.58/en/discover/food-and-drink/ http://10.50.200.58/site/assets/files/1471/food-drink.jpg Any help would be appreciated. Thank you.
  13. vanderbreye

    Is it somehow possible to let page->render() use global variables? I want to render subpages in a template, which works fine for some cases. The problem: In the template there is an include, depending on a variable, which is set in the header. in the first head/ first template: $mobile = true; foreach($landingpage->children as $child) { echo $pages->get($child->id)->render(); } and in the template: include_once("./header.php"); if ($isMobile) {include("./mobile.inc");} but page->render() will (of course) not recognize the unknown $mobile variable. is there a way to render the page with all its variables? Best, Jan
  14. robinc

    I am making a website where on multiple pages i would like to have swappable customisable 'widget's or cms editable areas. Can anyone suggest how to implement a good visual way of doing this? (eg. Like the repeater field but each entry is an inline editable widget)
  15. Hello everyone! It's been a while since I've posted on here, but I've got an issue that I haven't been able to solve by searching through old posts. I'm trying to allow a user to change templates on only two pages of their site. I've enabled page-edit and checked the box for page-template. When I log in as the user role, the template dropdown works, but it only shows the current template and no others. I'm using version 3.0.39 if that makes any difference. I'm stumped. Thanks in advance for your help and suggestions! They are much appreciated.
  16. Hello! I am using ProcessWire for a good three years now already, and I am really happy with the flexibility it provides. There is one thing though that bugs me. For a recent project, I need lots of templates. I already have a site/templates folder polluted with a package.json, yarn.lock, node_modules, errors, .eslintrc, .git and my entire build setup. And I thought: OK - when I am forced to use site/templates for templates, is it actually correct to put all my javascript, styles, components, functions, classes also there? I mean, at least this is what the default theme encourages (they put styles there also) I read into other posts covering this topic about having a sub folder for templates. Because even with the non-template files stored somewhere else, the template files are still too many. Unfortunately, they also discovered that this is not possible: Sub Directories for Templates Should all template files put under site/templates folder What are your ideas? I already thought about having a page field, that defines the template path from a dropdown, but with this I would only reinvent an already almost working wheel. Thank you for your inspiration. Best, Martin
  17. Hi everyone, I'd like to start a conversation about your view and practices for profitable web design and development (unless there is already one that I didn't find). I use ProcessWire for most of my sites currently. Wherever I look though I can see plenty of web design freelancers and even larger agencies running exclusively on WordPress and themes. Many people are running "web design" businesses even without any development skills. There are just so many that I started to doubt if that's the way to go. - Do you use Wordpress + themes to cut cost and increase your bottom line? If yes, what is the middle ground? Is it worth to put up with WP? - If not, what alternatives you use for micro/small businesses? - And finally, how do you use ProcessWire to speed up small, basic brochure websites? Clients care more about budget and results than "custom" design. I love working with ProcessWire but only if it doesn't mean lost opportunities. Any opinions are welcome, especially from those of you who are advocates for themes yet are skilled developers.
  18. Would it be possible to configure a different path to the templates for different users/roles? E.g. for the user admin the templates reside in the folder /site/dev-templates/ and for all others users the templates lie in the folder /site/templates/? With this, you could have a production-version of your templates and when logging in as a special user you can work on your development-version simultaneously. Maybe there could be a function to check-in ready templates to the production-version.
  19. Hello Forum members. I just wanted to confirm with you PW gurus on here that i got the thinking behind regions in the latest blog post right: https://processwire.com/blog/posts/processwire-3.0.49-introduces-a-new-template-file-strategy/ So my understanding from the quick glance of the article is that if i were to use the new regions functionality it would in simple terms work like this: The referenced HTML in any of my other page template files would be inserted at the designated place in the home.php template file instead of replace it with all HTML in that page template file that was requested ? And the home.php template file would become sort of a View, that used HTML from the other templates files to change acording to the needs? So that i would only need to put the HTML that changed in my other page template files and have the "full" HTML markup in the home.php ? I just wanted to see if i got it right. Thx in advance.
  20. Hi, I was just playing around with the Repeater fieldtype and wondered if this might be a good fit for something I would call a "FieldCollection". In a FieldCollection the behavior should be exactly the same as in a Repeater fieldtype where minimum and maximum items are set to "1" – just the look and feel in the backend should be slightly different. Think of templates that share two or more fields for the exact same reason – e.g. a "published from" and a "published to" date field and a checkbox. Instead of adding those three fields to every template that needs them, why not create a FieldCollection? Changing the FieldCollection will change the fields on every page it is added to. The only caveat of using a Repeater item set to min and max 1 item is its appearance in the backend: Some of the Repeater features (delete item, add new item, ...) wouldn't be needed for that particular usecase. What do you think? Many greetings! Nik
  21. zilli

    I need some help in understanding how filters work with PW pages and templates. I need to convert this HTML template to PW. Here is a working example. That specific page is giving me nightmares. What I think I know so far: the front-end doesn't bother me, I have that covered each single hotel page has its features/facilities/characteristics those features/facilities/characteristics should be in the single-hotel template a hotel index listing template should be created to hold an index of all the hotels(paginated) Now, do I need a sidebar template to hold the PHP logic of the filter or is that part of the hotel index?
  22. When you start a website from scratch and have to make both front-end and back-end of it, how do you set up your workflow? I’m a bit confused because 1) I’m new to PW 2) I’m setting up a marketplace where the vendors need to have access to the back-end, so they can manage their services/products, which will be listed in the front-end for “normal” users to buy them. More beginners' questions: What do you do first the back-end or the front-end? Is it correct to think of fields -> pages -> templates in this order? If yes/no why? Is the product page that the "normal" user see in the front-end, the same that the vendors have access in the back-end? Thanks!
  23. think i've got myself into a muddle here but i've got each template as a section in my homepage, when I go to each page they work fine (as they wrap the _main page content after), but on the homepage template I want to get all children and rendren the retun from JUST the template itself i.e. getting all the $content returns. Any way of doing this, not somthing I would normally do, just don't want to basically replicate each template into my homepag template as they may go out of sync. Thanks
  24. I am using a PW installation as a template for every future PW installation. So within that I create all kinds of fields and templates for many different use cases which might not be used later in a copy installation so I delete all unused. What would be a good way to delete them fast instead of clicking every single template and field and delete it in the delete tab?
  25. regesh

    Hi all. I'm creating module and it needs to create some actions in admin panel to work correct. So it would be great if somebody tell my how to do some things below using api (___install() method): create fields put fields to template Thanks