Jump to content

Search the Community

Showing results for tags 'templates'.

  • 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

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

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

  1. 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?
  2. 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.
  3. 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
  4. 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)
  5. 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.
  6. 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
  7. 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.
  8. 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.
  9. 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. ProcessWire Official Markup Regions Documentation (New 2022-09-08) https://processwire.com/docs/front-end/output/markup-regions/
  10. 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
  11. 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?
  12. 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!
  13. 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
  14. 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?
  15. 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
  16. I have a situation where a pagearray appears to lose its sort order. 1. template xyzzy.php fetches a pagearray with code similar to: // in an external include file function get_pages($selector) { $found = wire('pages')->find($selector); wire('log')->save('fubar', count($found)); return $found; } // in the template xyzzy $pa = get_pages($some_selector); $pa->sort('-timestamp'); 2. main.inc is appended to the template. in main.inc an additional file is included, './layouts/xyzzy.php' 3. './layouts/xyzzy.php' then references $pa as such: <? foreach($pa as $p): ?> // do stuff with $p // log for debugging wire('log')->save('xyzzy', $p->name); <? endforeach ?> 4. The $pa that './xyzzy.php' sees is sorted while the $pa that './layouts/xyzzy.php' sees is NOT sorted. It seems like the PageArray/WireArray got copied at some point but the './layouts/xyzzy.php' file shouldn't have been included until 'main.inc' is appended. What am I missing?
  17. Hi Forum, we moved an installation from the live server to localhost for further development. Unfortunately now PW doesn't find files in the /templates/ directory anymore (e.g. css, js and so on). Functions testing for existing files abort with an error and the console throws 404 for the files in question. Two developers have checked (so far several times): site/config.php $config->httpHosts .htaccess file permissions on /templates/ and all subdirectories (set to 777 just to be on the safe side) our own php functions Our version is 3.0.22 devns. We are running out of ideas. Any help is appreciated. Thanks.
  18. Hello folks I made this simple tutorial of explaining my methodology when creating a PW system. https://medium.com/@clsource/understanding-processwire-templates-fields-and-pages-201aecd0a1a4#.osipvjevk
  19. Hi, I have been running a processwire based film magazine for more than 3 years now. The resources are wonderful, and the forums are full of information so much so that I did not have to ask a single question during the design process or later. I just added it in the showcase section when the site was done. http://projectorhead.in But in the last week I have been facing some real trouble and the forums dont seem to have anything related. The problem; Once in the admin section, I cannot publish any new content, pages that have some exisiting content, dont accept anything. If I wish to update module settings/ install or uninstall any new module, it does not work either. Every click on any button meant to achieve something in the admin leads to a 404 error in the front end. It started from one page but now nothing would change in the admin, it feels like it has become a hard ball of metal which would just not move. The attempts; 1. I upgraded the entire installation, thinking it was due to the outdated version. I am running the latest stable, 2.7.2, php version 5.6 2. I turned on the debug in config.php, it threw some notices and warnings, have fixed all barring one, where imagesize wants another variable, it hasnt created any issue in the past. 3. I cleared up all caches using the filemanager, removing cache files. Since the backend will not let me purge caches, I had to use the file manager. 4. I cleared the cache table from the phpmyadmin. 5. ProcessImageMinimize was throwing up errors, so I removed the calls from the template and deleted the module using file manager. 6. Saw some suggestion about the .htaccess rules, played around and nothing worked, however the .htaccess is being duly read and used by the server. I am out of options and having to stall the latest issue of our magazine, would really appreciate some quick help on what else I could try, possible solutions etc. I hope I have described the problem sufficiently, but if you need any more details, please ask. Best.
  20. Hello Fellow PW users and fans. I have a simple question that needs an answer. Have been working on a pretty complex site know for a while and lots of template files. So i was wondering if i could for sake of keeping everything organized could sort my template files in sub directorys and still have PW recognize these template files and find them when needed ? Or do i have to keep them all in the same "template" dir. I know how to use include() and all that. So thats not what i am after. Because i would like to distinguish my main template files and some that are experimental and possibly not going to be used in the finished site. And there getting to be alot of them at this point and at times a bit confusing to distinguish them. Well there you have it. thanks in advance.
  21. I see it's possible to Export and Import data from the Templates and Fields panels. Awesome. Is it possible to configure these settings in a text file or files that live in the site directory? The /site/templates directory already contains PHP files for each template, but they don't cover the template and field metadata that one configures using the ProcessWire admin panels.
  22. As I’m getting a bit more into the e-commerce idea I was talking about in one of the other threads, I have been thinking about the PW template system. In a shop system you’d need a kind of basic product template with certain necessary fields like default price or something like that. But you’d also need the possibility to have variations of a product template, where additional fields can be defined individually for a certain kind of product. I know that there is the possibility to clone fields from an existing template. But I don’t think, that is a good solution for this particular problem, as you were able to delete some of the basic product data fields. So my thought was, that it maybe would be a cool thing to be able to define a kind of relationship between templates. Like a class extending another one you could define an existing template as parent and the child template would inherit all fields and settings. New fields could be added, the inherited fields were kind of protected, the settings could be overridden by the ones defined for the child templates. I guess, this could be achieved by a module pretty easily. But I think it could also be a pretty nice enhancement as a core feature.
  23. Hi all, I just wanted to find out how Processwire developers manages their templates and components/partials these days. Are you guys using spex/twig/template data providers or just plain processwire setup? Below is my setup: - Using Spex which can be found here: http://modules.processwire.com/modules/spex/ - partials/components are stored within these folders /site/templates/partials (Spex design by default) - there are options to set different base using using Spex - templates are built by outputting these partials/components - the rest of the setup is easier to read from Spex readme file rather than me trying to explain in it here. - php short tags whenever possible. Here are some screenshots: So far so good with Spex setup and I quiet like it however, Spex has not been updated for quiet sometime now and not sure if this module is going to support version PW version 3 moving forward. In the past, I've used Twig template engine (http://modules.processwire.com/modules/template-engine-twig/) created by wanze but not really compatible with Procache module which is a deal breaker for me but it works really well if you don't need Procache support. I understand the same topics have been brought up couple of times in the past (feel free to close this down if required) but I thought I brought up the same discussion again to get some new and cool ideas how to manage templates to make your life easier as Processwire developers. Many thanks!
  24. I am coming up close to when I need to move over my local branch to the live site and was wondering is it actually possible to move the templates (with assigned fields) over to the new site without having to reassign the fields? I know I can backup/import the fields themselves, but I have 78 fields assigned between 2 templates that would be a pain to "redo". Thanks again for all the help everyone. I am loving processwire thus far.
  25. For my event template I have tried setting the Name format for children as title and date, respectively, as those are the only two I've ever gotten to work with that. So I do have a small module that renames them before save, to Y-m-d-title, but I can't manage to get adding an event from the admin the standard way to skip the Page Add step with the Title and Name generation. Not only that but it always displays the warnings for Name Already taken, which I don't want, as they're organized by date... Admin users don't need to see "The name entered is already in use. If you do not modify it, the name will be made unique automatically after you save.". How can I bypass this? Thanks.
×
×
  • Create New...