Jump to content

jensweigel

Members
  • Posts

    34
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jensweigel

  1. With the Less Module you can place a admin.less inside your templates folder.

    .PageList .PageListItem {
        &[class*="PageListTemplate_component"],
        &[class*="PageListTemplate_section"] {
            background: #f3f3f3;
            border-bottom: 1px solid #e0e0e0;
            &.PageListItemOpen {
                background: #e0e0e0;
                border-bottom: 1px solid #c9c9c9;
            }
            > a {
                padding-left: 10px;
                &:before {
                    content: "\f061" !important;
                    margin-right: 10px;
                }
            }
        }

    }

    so all Component Template begins with „component…“ (section is only a older version)

     

    • Like 1
  2. 1 hour ago, ngrmm said:

    But I can also understand how you create the structure. And with restricting template usage for children there should be no irritation for customers, right?

    Oh that’s interesting! So I guess I should review it again. The irritation for the customer is maybe less with the matrix solution.

  3. 1 minute ago, maetmar said:

    thanks for sharing. 

    just fyi. I think you can do something very similar using the Pro Module and Repeater Matrix

    Oh yes you are right! I considered that as an alternative. The advantage for me using Pages is a better overview and handling in the backend. Disadvantage: understanding differences between Page and Page content is for customer very hard.

  4. On the template: (you see the module approch)

    139764303_Bildschirmfoto2023-07-12um10_59_34.png.3f5e63520f29c1c963a5ab0f8729888f.png

    getComponent gets all allowed page components, loads it template files, wraps it if needed.

    Every component has a wrapper builder where I can choose what css class it will use.

    2036049995_Bildschirmfoto2023-07-12um11_03_18.thumb.png.d7c48527567d880807bb38861d81c7bf.png

    this will wrap this component into

    <div class="hero">
      <div class="heroinner">
        {COMPONENT-CODE}
      </div>
    </div>

     

    • Like 4
  5. 2 minutes ago, ngrmm said:

    Could you describe this method in more detail? Maybe screenshots from the backend?

    Yes of couse

    802052398_Bildschirmfoto2023-07-12um10_45_08.png.b6ecd632c32d5a073caa4e22b8495317.png

    All pages with white background are pages. The grey background are page contents. So I have an easy way to rearrange, move or extend. The warm grey sections is for header and Footer wich works in the same way as the pages. So it can have page content like logo or navigation.

    So you see the main Page "Kanzlei" have 6 page contents. The hero, a text component, the Expertise with some sub pages, Team, News and Events. In this case all of these have subpages.

    Other example: (Schreinerei Merte)

    1640608126_Bildschirmfoto2023-07-12um10_53_54.thumb.png.3e54d44c430af94c29f2dc94c5b65527.png

    You see a Wrapper wich just create a wrapping div around some kind of content.

    Output:

    1876798579_Bildschirmfoto2023-07-12um10_56_00.thumb.png.4307b5221a2cc94cae9c8551adc9ea86.png

    • Like 3
  6. kkp-law-hero.1600x0.thumb.png.ab71c1af6bd4e44b7750c1d41c3bf6ad.png

    The KKP.LAW site has been a Site of the Week in Processwire Weekly in the past. For this reason I would like to share some insights. So I hope someone will get an inspiration and maybe others may provide idees how to improve my process.

    Development Setup

    Currently I build my projects with DDEV and upload them to the server using Github Actions. This way I can view and develop them locally and push them to live when I am done. I also have SCSS which I write to a src folder and is watched by DDEV and also by the GitHub action. So it is possible to change SCSS via a browser in GitHub and everything will be deployed automatically.

    The basics

    The KKP.LAW was the last project before I develop this orocess with modules. But the basics are almost the same. Years ago I used Typo3 for building websites. But the really complex update routine, the complicated configuration and the ongoing change how you should build templates made it necessary for me to look for a new CMS. So Wordpress was never an option and many others were also very complicated, so I looked at ProcessWire. After a second look I really understood the approach and built my first websites with Processwire. Very quickly I switched from Typo3 to Processwire. Implementing new features into existing websites was so easy with it.

    But one thing I really liked in Typo3 was the concept of pages and page content. On each page you can have multiple page contents. I.e. text or images or a mix of both. So I started to rebuild this logic in Processwire. I have templates for pages and templates for page contents. I use a page and pagecontent tag for the different types. On the PHP templates I just need to include them. So each page collects its page content children. All page contents can have a wrapper with some css classes. So it is easy to create layouts with this system.

    CSS Framework

    For this I use a kind of own CSS framework which is much more individual than big ones like Bootstrap. Personally I like the concept of 10 columns. So I have a 10 + 4 + 3 column system. Paddings are always added inside a column. So I dont need rows. All page content is inside a div tag with display: flex; flex-wrap: wrap;.

    The result is very clean and I get a slim file sizes.

    Components

    Later I changed the page content more into components. They are not as powerful as in modern JavaScript framework. It was more a logical step for me. In my eyes, the massive classes I would need to build responsive websites always displeased me. So more and more I changed my approach to design and configure everything in a component with maybe one or two classes and do the rest in CSS. But in some cases the old approach is still good.

    Current approach

    So I made some modules for my basic needs. The current module is very personal build arrount my needs and my DDEV configuration. Each component (or page content) has its own module. So it has some methods, PHP template and basic scss which I bind into my deployment process. I wrote a bash script that sets up ddev, installs Processwire and these modules. Also creates a GitHub brunch with the required action that can be synced into a live server.

    -

    So this is a basic overview of my approach. Hope it is an inspiration for you. Questions and suggestions are very welcome.

    See Website:

    KKP.LAW

    My own website: (also Processwire)

    Jens Weigel – Büro für Design

    • Like 14
  7. @Teppo

    Great Module! Are there more examples for an API call of your module? I want to track all changes and list them on a special site. Only changed pages/fields should be listed. Any ideas?

    foreach($page->versionControlRevisions() as $key => $alue) {
    	$page->snapshot(null,$key);
    	echo $page->name;
    }

    How can I compare fields in the version with the current version?

     
  8. A follow to my previous post:

    I think this a weird problem. I tried it with some images and it turns out that only images form Adobe Stock have this problem ?????? also Fotolia (wich are the same but different payment options) Shutterstock is no problem. 

    Even if I resize/crop the Adobe Images the problem remains …

    So I think I just don't use Adobe Stock…

  9. Are there still somebody who is interested in this topic? I made some silly solutions for my personal purpose. Maybe we can exchange know how.

    For the base I structure my PW sites similar to Typo3. I have pages like Sites and pages like pagesections. SImilar to Typo3 they have different kinds (text, pictext, pic, …) 

    The current task is to rewrite the tt_news urls. This is so crappy if you see how easy PW handle it.

     

    • Like 1
  10. Hi Adrian

    this module looking very good! But i have some strange problems. So export on page tree from one site (whole tree; pw 3.0.15) wich works very well. And I want to import it on PW 3.0.18 System. wich seems to work also well. Templates and fields are created. I also get the info "Created all required templates and fields and imported/edited 140 pages" but if I view on the page tree nothing is there. I dont see any errors. So maybe its because of the 3.0.x version. Do you have tested it with the 3.0.x version?

    What else could I try?

×
×
  • Create New...