Jump to content

Make a magazine style homepage for Blog profile?


siulynot
 Share

Recommended Posts

Hi again. 

This is my first project on processwire, by now i think its a whole lot more professional than wordpress (the cms i used before). 

I want to make a magazine style blog, with featured articles, a slideshow or a featured article's tab in the homepage.

Im looking around and dont seem to find a module that makes this possible. 

If anyone knows a "simple" way to do this, ill be more than glad to read :D

  • Like 1
Link to comment
Share on other sites

This is in fact simple to do, but it does require knowing how to put it together without a CMS first. So I would suggest getting your layout up and running as a functional mockup, outside of ProcessWire or any CMS (just HTML and CSS). You could also get by with using an existing HTML page that already does these things. 

Lets say you've now got that in a file called home.html. With a fresh install of ProcessWire (using the included profile, not the blog one), you'd copy your home.html file to /site/templates/home.php. 

Now view the homepage on your site. You should see your page. If some things are broken, then that is because the links to the CSS files and other resources have changed. Typically we place our CSS files in /site/templates/styles/ and our javascript files in /site/templates/scripts/. But you can place them wherever you want. Wherever you place them, you'll want to update your /site/templates/home.php file to reference them directly. So if you had a line at the top that said this:

<link rel='stylesheet' type='text/css' href='css/style.css' />

Then you'd copy everything from that old 'css' directory into /site/templates/styles/, and then update your code to say this:

<link rel='stylesheet' type='text/css' href='/site/templates/styles/style.css' />

Better yet, make it say this, so that it will continue working no matter where you happen to move your site:

<link rel='stylesheet' type='text/css' href='<?=$config->urls->templates?>styles/style.css?>' />

With that line above, we're asking ProcessWire's $config variable for the URL to the templates directory. Since it determines that at runtime, it'll work whether your site is running from root or a subdirectory.

Once you've got your homepage looking the same as it did outside of ProcessWire, then you are good to move forward with the next step, which is to make it dynamic. This short tutorial will get you started and give you what you need to know to proceed with your magazine style blog homepage. There are also more tutorials in the Wiki that you may want to check out after covering the basics. 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...