Jump to content
Sign in to follow this  
franciccio-ITALIANO

About Standard Theme Processwire: where is html file?

Recommended Posts

Hi, I know the the templates in processwire are html files.
I search it into foleder "site" of standard installation of processwire standard theme (blanck and that blue) but I don't find any html file to modify it by html code.
So, I must modify it only by php code?
Can I traduct php pages templates in html page?

Share this post


Link to post
Share on other sites
Quote

I know the the templates in processwire are html files.

They are not, the templates are PHP files.

Quote

I search it into foleder "site" of standard installation of processwire standard theme

You need to look in /site/templates/

Quote

must modify it only by php code?

Yes

But if you use the wireRender pattern, then you can create pure html views, still .php files, but those can be placed into a $content variable for delayed output.

Share this post


Link to post
Share on other sites

Hello @franciccio-ITALIANO,

you could start by renaming the HTML files inside your templates folder from .html to .php and add them as templates. But those template files would be still static HTML. So you would have to define some fields for your dynamic content and add them to your templates. Next step would be to output those fields with PHP between the HTML. But this has been already explained more better here:

http://processwire.com/docs/tutorials/how-to-structure-your-template-files/
https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/ (Must read)

Regards, Andreas

  • Like 3

Share this post


Link to post
Share on other sites
6 hours ago, franciccio-ITALIANO said:

Must I traduct html files in php code by... what? Exist a program or application that do this work?

I would just say, it's no small thing – adapting a CSS theme to be used in processwire requires a decent knowledge of how to use the API, as well as some fairly good experience with HTML and PHP.

I can get a basic HTML 'theme' into a simple PW site in around 3-5 hrs, depending on the complexity, and that is using a lot of helper modules and functions that I developed over the years. It depends on the content of the site, how many templates you have and the types of fields you are using. For a 1 page site, it should be pretty simple, you just need to replace the contents of the _main.php file with the content of the html file and then update all of the paths to the assets, using for example a call to the $config variable for the templates folder (e.g. $config->urls->templates . "styles/my-style.css";)

  • Like 2

Share this post


Link to post
Share on other sites

Many of us have used "classical" systems with "system rules" to make websites before using Processwire. Processwire is a decoupled system without any rules. So with Processwire you handle html by: 1. writing your own html code in your processwire template files, 2. including inc files that hold your html code using php include, 3. generating dynamic html code with the processwire api combined with php, 4. etc. etc. etc. So if you see a nice free html template somewhere on the internet that you want to use to make a website, you would have to strip its html code and bring it inside processwire.

  • Like 2

Share this post


Link to post
Share on other sites
9 hours ago, Macrura said:

-...and then update all of the paths to the assets, using for example a call to the $config variable for the templates folder (e.g. $config->urls->templates . "styles/my-style.css";)

 

Thank to all!

But I don't understand this up.

The .php templates files have to put in "site -> templates". Ok.

The css. file in  "site -> templates -> styles". Right?

The images of the templates in "site -> templates -> styles -> images". Well.

So, WHAT must I put in  "site -> assets"
Must I don't touch it?

Then, in packets that I download by  http://www.free-css.com/, we find .js files and .scss file.

Now, in processwire into which folder must we put it?

Macrura, I don't undierstand where and why I must write php code that you suggest me!

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Once you are in the site->template folder you can structure your files/directories as you like, as long as you link them correctly inside your template folders.

And yes, leave site->assets alone ;)

You can contact me on skype (my nick is : The3fingers), I'm italian too.

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, franciccio-ITALIANO said:

Macrura, I don't undierstand where and why I must write php code that you suggest me!

you would be writing php code to communicate with the PW api, to get your dynamic content from the CMS.

In reference to the $config->urls->templates, you can take a look at the default _main.php to see how that is being used to reference the themes folder, when you reference an asset (css or js file) that is stored within your templates folder.

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, franciccio-ITALIANO said:

3fingers, have you anu facebook contact? I use often it!

I do, but I use it just in my spare time, so close to nothing :) I prefer the skype way ;)

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Mithlesh
      Changing it to null
    • By Mithlesh
      Hi, I have one URL - writerrelocations.com/contact-now/

      I have one issue where my header Image is appearing again after the contact form, for your reference:



      I have checked my processwire template section where have not added any Image field besides Header Image, attaching the same for the reference:




      PLEASE help me to get rid of the image below contact form

      Waiting for the swift response!

      Thanks
       
    • By sambadave
      Hi everyone, here's the problem I'm trying to solve.
      I have a config area in my PW admin that is locked down for admin use. I use pages to store a bunch of settings that I'll use for my clients website. It's mostly used for visual things like colours and theming. This list could be tiny or large, depending on the sites requirements, but its great because I can store any information I want to. So the page tree could look something like this:
      ADMIN SETUP
      Home Config Aesthetics Colours Red Field: Custom Label - "Red" Field: Class name - "theme--red' Green Field: Custom Label - "Green" Field: Class name - "theme--green' Blue Field: Custom Label - "Blue" Field: Class name - "theme--blue' etc... Sizes Small Field: Custom Label - "Small" Field: Class name - "sm' Medium Field: Custom Label - "Medium" Field: Class name - "md Large Field: Custom Label - "Medium" Field: Class name - "lg" etc... Icons Target Field: Custom Label - "Hands shaking Icon" Field: Icon SVG - "[svg code]' Target Field: Custom Label - "Target icon" Field: Icon SVG - "[svg code]' Success Field: Custom Label - "Happy face icon" Field: Icon SVG - "[svg code]' etc... HOW I USE THIS
      I'm then able to set up page reference fields for colour, size and icons. I'll use these fields on particular pages so that my clients can select a particular colour, size or icon, or anything really. Currently, with the page reference field I can create a custom label for the options. So for something like colour I can label the field "Theme" and present a list of colours like "Red, "Green" and "Blue" using the custom page label label format of the colours page.
      This of course means that I can use this to do some lovely presentation on the front end of the site. With a colour selected I'll then be able to use the page reference to get the class name for that colour theme so that I can update the page's look and feel. So in my markup I'd end up with "theme--red" or "theme--green" etc.
      THE PROBLEM
      I have this all working which is great and it's really flexible for the client which they love. However, I'd love to be able to make things more visual for the client.
      Is there a way to be able to output more than just text in the page reference field? I might have a bunch of different blue colours, so instead of a list like so:
      Navy Blue Deep Blue Bright Blue Sea Blue ... it would be great to be able to output actual colour swatches, which is a lot mor visual for the client.
      Taking the icon selector, I would ideally like to show the actual svg that I've stored against that icon as a selectable image instead of seeing text options like:
      Hands shaking icon Target icon Happy face icon Just a couple of scenarios here, but as you can see there could be any number of reasons to display a more visual method of selection.
      ANY SOLUTIONS?
      I've looked at modules like FieldtypeColorPicker which could help in solving the colour issue, but it doesn't allow me to select a colour and then use a particular class name assigned to it the way I describe above.
      Considering the other use cases I mention above, does anyone know if anything exists already that would help me to create custom presentaion for page reference lists, or if there's anything planned?
      Thank you in advance for anyone who's read this far and has any words of wisdom!
      Dave
       
    • By snobjorn
      I have been searching a while for pre-made UIkit 3 themes that I can download in some form and use. But I have not found much. I work with variables and compile most times, but sometimes I would prefer working with a "finished" theme as a starting point
      I have found the following resources:
      https://github.com/zzseba78/Kick-Off https://github.com/uikit/awesome-uikit Do anyone else know of UIkit 3 themes that you could list?
×
×
  • Create New...