Jump to content
siulynot

Make a magazine style homepage for Blog profile?

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

wow! great answer... im right now on my cellphone, but as soon as i get home ill give it a try and let you know. thanks!

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DarkwaveSurfer
      Hi,
      I really like this module.
      I was wondering if it is possible to add featured image field to blog posts? I'm sure it is possible but don't know in which template file should I add new image field so it is available in all posts as featured image right after title of post.
      Thanks.
    • By a-ok
      I have a bunch of child pages added to a parent section called 'Projects'. These are all being looped out on an overview; for example:
      <?php $projects = $pages->find('template=project-detail, sort=sort'); ?> <?php foreach ($projects as $project) : ?> These pages will become quite long overtime, but I want to add a 'featured' option to them so they add a class to their element if they are 'featured'. Normally I would just add a tickbox so if it's ticked, it adds the class etc. However, as there are going to be so many pages, looking through them all and maintaining this (as the 'featured' option will change often) will get a bit messy. So, I've created a 'Page field' for the overview, so you can choose which pages you want as 'featured' and remove them easily. However, I'm having an issue working out how I can tell the child page that it has been 'chosen' to be featured, if you see what I mean? How can I, within the $projects loop, cross reference it with the 'featured' page field on the overview, and if they match, add a class?
      For example
      <?php $featured = $pages->get('template=home')->featured_items; ?> // Getting an array of the featured items <?php $projects = $pages->find('template=project-detail, sort=sort'); ?> <?php foreach ($projects as $project) : ?> <div class="item <?php if ( $featured->id == $project->id) : ?>featured<?php endif; ?>"></div> // Checking if the featured id contains project->id <?php endforeach; ?> I know the above isn't right, but you get the idea. Can you help at all?
    • By elmago79
      Hi, there, ProcessWire community. I'm seriously considering ProcessWire to make a Magazine-like site.
      But first, allow me to indulge in some history. Two years ago I was searching for a CMS to make a site for a magazine. I remember Processwire seemed very attractive but in the end I chose Wordpress. Boy did I ended up regretting that decision! Not that the site doesn't work, it works just fine, it just that maintaining it has been such a pain in the ass (and ended up stealing editing time, as I was also the editor). This year, as I transition to a new position, we hired a developer to simplify the admin burden that's currently placed on the very small staff of the magazine. With more than 2,500 posts, all of whom depended on custom plug-ins, we decided that moving out of Wordpress was out of the questions, even if it took so much time, we were to invested in it.
      In conclusion, I don't wan't to fall into the same mistakes and now I'm thinking about building a new site for a new in ProcessWire. It seems like it can already do a lot of the things my previous site did without the need of plugins: tags, categories, multiple authors, multiple post formats. But some plugins I think I will need, such as the one for adding fields to images (for properly crediting the images). I would also love a Markdown editor, which it seems currently doesn't exist.
      So I have a few question for you:
      * How stable are plug ins? Am I going to run into the same problem as Wordpress, when plugins stop working from one update to the next?
      * How easy is ProcessWire to update? I'm chosing it in part for the roadmap, and I want to take advantage of new functionality when it approaches?
      * Will 2k visitors, 6K pages daily be any problem with ProcessWire?
      * Can I have a template for a single page?
      * How come there's no markdown editor?
      I am mainly an editor with some self taught front-end skills. All the php I know is from this last two years battling against Wordpress. I already feel I'm a little over my head but I hope I'm making the right choice
    • By Peter Knight
      Hi 
      I have an area on every page of my site which includes 3 columns of "featured" content as determined by my client.
      Each feature consists of:
      A page title (and link to parent page) An image Small paragraph of summary text
      I know that I must add these fields to my pages and then populate them with content. The part i'm stuck at is how best to let client my determine which 3 pages get featured. I think number 3 here is the best way but wanted to ask more seasoned users their approach.
      Should I ...
      1. Create some mechanism for a client to specify a page as "featured" thereby triggering inclusion into a footer. I'd have some API call scanning pages for a checked "featured" checkbox etc
      or
      2. Create 3 small sub-pages elsewhere on the site consisting solely of the title,image,paragraph fields. I could place them in some kind of sub-folder called "featured". My client would be told to only ever have 3 sub pages and they could edit, rearrange etc
      or
      3. Create a single page called "Featured" consistign of the new ProField Table whereby client can order and reorder as they wish. That ProField Table would be a row consisting of "Title", "Image" and "Summary".
    • By sakkoulas
      hi everyone,
      i will appreciate some help of you.
      if you had to build a news portal with multiple categories and tons of articles, How would you build it?


      solution 1
      home page
      category 1
          item
          item
      category 2
          item
          item

      solution 2
          Home Page
              news
                  category1| template 1
                      article | template 1,2
                      article | template 1,2
                  category2 | template 2
                      article | template 2,2
                      article | template 2,2
      solution 3        
      Home Page
          news | template 1
              article -> page field selected category | template 2

      article -> page field selected category | template 2
      article -> page field selected category | template 2
      category page field
          category 1
          category 2
          category 3
      of course i have study Ryans blog module  and i know  he use the third solution but i am afraid if this style gone be hard after some thousands of articles to be filtered, searched. thanks
×
×
  • Create New...