Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Blog page

edited June 2012 in Design

In regards to the blog coding...I have that working. It displays beautifully on the main page...I also have a nav link for Blog. The question I have is this...my blog page is named news which forwards to /blog. Is there a way to make the Blog page look just like a running blog? In this I mean remove the index-blocks and have nothing else except blog entries? Right now, it just mocks the homepage.

Thanks

Comments

  • You can specify an alternate layout for the blog in apps/blog/conf/config.php.

  • Sounds good. Appreciate that. Do I just make a different html page with the coding I specifically want on there and include it in my layout/mytheme folder I am assuming.

  • Exactly right! :)

  • I'm learning. :-) Thanks for the direction.

  • edited June 2012

    Alright...in the config file i set the value layout = blog. I have created the blog.html file as I want it. I also created blog.css and referenced it in my html file. The page when I go to it is laid out like I wanted it but it looks like the default page when you first install elefant minus the slideshow. It has the photos by rachel hosein in the footer. Its not grabbing the right pages. I even went to Tools...All pages...and clicked edit on the News page...then under Extra Options selected Mtech/blog for the layout but it never changed.

    Update...I just went and renamed the files and references to News in case there was an issue with using the word blog. Still no luck. http://cms.wetype.it/blog to see what I mean

  • It looks like you set post_layout = blog but not layout = blog. There's the option to use a separate template for posts as there is for the main listings. In you case, make sure both are set to that and you should be good.

  • edited June 2012

    Actually post_layout = default for the Blog post page...the layout = news for the blog listing pages. I just set both to = news (since I renamed the files to news.html and news.css). No different. Still looks as described above. I even set under Extra Options to use Mtech/news but no go. The page appears to look right if I am logged in and on the blog page except that it says this is the page that redirects..blah blah. However logged out...its generic.

  • I think I see why now....if you go to the page and right click and View Source...you will see that the coding is calling css/style.css even though my html file calls in css/blog.css. Any idea where to correct this at?

  • Okay...I added some meta data including the link to the stylesheet on the apps/blog/views/post.html page. It now displays somewhat correct. You can tell its processing the stylesheet for the most part now...however, its including footer info and not following position rules. The css sheet I am using is identical as the home page except that I removed the index-blocks section from the html and css page. So...theoretically it should look identical in position and colors. This is boggling my mind. Any ideas?

  • It looks like you are in fact calling both. In your source I see

    Line 4

    <title>WeType.IT - Blog</title>
    <meta charset="UTF-8" />
            <link rel="stylesheet" type="text/css" href="/css/reset.css" />
        <link rel="stylesheet" type="text/css" href="/css/text.css" />
        <link rel="stylesheet" type="text/css" href="/css/960.css" />
        <link rel="stylesheet" type="text/css" href="/css/style.css" />
        <script src="/js/jquery-1.7.1.min.js"></script>
    <script src="/js/jquery.localize.min.js"></script>
    

    Line 38

    <h2>Blog</h2><meta charset="UTF-8" />
    <title>WeType.IT - </title>
    <link rel="stylesheet" type="text/css" href="/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/css/text.css" />
    <link rel="stylesheet" type="text/css" href="/css/mobile.css" />
    <link rel="stylesheet" type="text/css" href="/layouts/mtech/blog.css" />
    

    Double check your calls, you seem to be rending your blog layout inside of your default layout.

  • If it's pointing to the right template, that should be in the template files.

  • Oh hey, you updated something! Looks different than a couple minutes ago.

  • I left all the coding for my blog as told to do so when I first signed up with Elefant. Now...I have created a blog.html file and referenced a blog.css sheet which is a copy of my style.css sheet. I removed the index-blocks coding from the blog.css and blog.html sheets. Still nothing. I added the line of to post.html. Thats it. Not sure where the other stuff is coming from in the view source of html. I didn't add that there. I am not even using 960 grid nor does any of my css contain anything about grids. But yes...since i added the style sheet reference to post.html...it does somewhat look like its supposed to.

    It still isnt processing it like my home page nor did I add a link to Rachel.

  • Johnny...maybe you can login and check it out for me. Same credentials I emailed you a while back.

  • Might be helpful to send over a copy of your apps/blog/conf/config.php file first, then I can cross-reference :)

  • I think you need to change the config lines to = mtech/blog since the blog template is in layouts/mtech.

  • edited June 2012

    Tried that already...page errors out. Email sent.

  • Hmm, works for me here. I grabbed a copy of your layouts/mtech/blog.html and layouts/mtech/blog.css and changed apps/blog/conf/config.php like so:

    ; This is the layout to use for blog listing pages.
    
    layout = mtech/blog
    
    ; This is the layout to use for the blog post page.
    
    post_layout = mtech/blog
    
  • edited June 2012

    I would imagine it may be something in your handlers. Are you trying to reset the layout like this anywhere in your apps/blog/handlers/index.php?

    $page->layout = 'layout'
    
  • edited June 2012

    It works with layout=blog and post_layout=blog but its not styled correctly completely and its including information in the footer such as photos by rachel that I didnt include in there.

    In regards to the handlers question ShortJ...I didn't do anything to that page. It currently reads $page->layout = $appconf['Blog']['layout'];

  • Just double checking. That's what it should say.

    Hmm. That's means that somewhere you are overriding whatever layout is being set by the blog app config to the default theme.

  • Not sure. I have everything left as normal. I have the blog page set to use layout default...I have also tried setting the blog page to layout Mtech/blog. It grabs the colors and some of the styling from the css for the login page but not processing the fonts...and it has the Photos by Rachel Hosein on there too. Not sure whats happening. Its weird.

  • edited June 2012

    Okay...I just did some investigating...its apparently pulling from the css/style.css file for some reason. I bet if I replace the code on that style sheet with my code...it will be normal again. Guess thats a work around...just dying to know exactly what's happening though.

  • Nevermind...I added blog.css to the css folder and renamed it style.css....now in view source code...If I click on the css link from inspect element...it shows to the left Stylesheets with blog.css in there as well as style.css. The page did change quite a bit but for the worse. Seems like something isn't rendering correctly possibly?

  • Finally got it working. Sheesh...main problem was permissions on the files. Then I set the coding back up again on the html and css page..uploaded. Ensured it was overwritten via FTP client. I use Coda for developing here at home on the Mac and Eclipse or Aptana Studio 3 at work. Then, I checked and it was good. The config file strangely was set back to default so I set it back to mtech/blog and then on the page itself, I set it to use layout Mtech/blog. What a mess. Persistance is the key to success.

  • Are you using git by any chance? That's an easy way to assure that all your files are the correct ones.

  • edited June 2012

    I do use GitHub but I am working off a copy I have on an external drive. I have all the correct files...just for some reason the files residing on my web server had permissions that wouldn't allow writing. Not sure how that happened considering I have been making changes to my first template. It's when I created the blog.html and blog.css files that I started having issue. It's probably just because I created the 2 files and uploaded them, I didn't specifically go on the server and set the permissions for them.

    I just tested the theory...I created a separate page for contact and the default permissions are 644. I changed them to 777 and all is well.

  • Ah. I know I use git to have my local dev copy and work on that, when it is ready I'll merge to the master branch. Then pull from that master branch onto my web server. No FTP needed. Much faster and keeps everything in sync. If you just want to play with a new copy and don't want to risk screwing something up, just clone the master branch and mess with it and run no risk of breaking your master branch/site.

  • I haven't downloaded anything nor uploaded to the master yet. I only forked the elefantcms master from Johnny's repository. As I make changes upon saving, it uploads from Coda to my webserver. It works well...just forgot to set permissions on those files once they were on my webserver.

Sign In or Register to comment.