Default post showing on “home page”
Posted: 13 May 2008 01:46 PM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  53
Joined  02-07-2008

Is it possible to code the template to show a home page “post” or page? I’d like to make the index template a “page” template with the home page default (if you go to site or index.php) and individual page if not.

Is this possible? I’ve looked through the documentation but either overlooked it or it’s not there… or I’m just searching for the wrong terms.

Any help would be appreciated…

 Signature 

Brandon Eley
Kelsey Advertising & Design

Profile
 
 
Posted: 13 May 2008 03:57 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  789
Joined  02-15-2008

I do this by creating a weblog called ‘home’, and then checking on my index page for the existence of a {segment_1} - if there’s not one, that must be the home page so I render that weblog.

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
Posted: 15 May 2008 09:43 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  16
Joined  03-19-2008

My question is similar. I want specific home page content, but I have no reason to want to publish multiple entries in the ‘Home’ blog. It only needs one block of information, but I want it to be easily editable in the future. Once I hand off the site to the client, it might be confusing to have the ability to create multiple entries in the ‘Home’ weblog, but only one ever showing up on the home page.

Profile
 
 
Posted: 15 May 2008 09:49 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  789
Joined  02-15-2008

This was by far my biggest gripe with EE when I started out. I wanted exactly the same as that Shinka - there are ways to pull it off (this is a good read) but now I’m pretty comfortable with the ‘multiple posts per section’ thing and so far (though we’ve only signed off one EE project as I write this) so are the clients.

Slightly off topic, the guys from 37signals who write Basecamp etc wrote a really good piece on their site about how people find other ways to do stuff. For example, they don’t have a priority setting in Basecamp, and they noticed people were doing things like adding a * before the task title if it was important. I think the same is kinda true of this, you just have to work differently and it turns out you maybe didn’t REALLY need it afterall.

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
Posted: 15 May 2008 10:25 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Avatar
Total Posts:  16
Joined  03-19-2008

Well, I do really need it, as plenty of websites need a static home page. Either some sort of ‘welcome’ text or a description of the product, etc. Yeah, I could just hard code the text into the *index template, but then my clients wouldn’t be able to edit it once it’s there. I tried installing the ‘Static Pages’ module but then realized it had been replaced by the standard ‘Pages’ module. Maybe we’ll see a feature like this implemented in EE2?

Profile
 
 
Posted: 15 May 2008 10:27 AM   [ Ignore ]   [ # 5 ]  
Grad Student
Avatar
Rank
Total Posts:  53
Joined  02-07-2008

Thanks for the suggestions. We ended up going with a much more simplified approach. We just added a “Home Page” to the default weblog (the same that will house the pages) and created two templates, one for index and one for “pages”.

The index template just specifies the entry: entry_id=“1”

Duh raspberry

 Signature 

Brandon Eley
Kelsey Advertising & Design

Profile
 
 
Posted: 15 May 2008 10:28 AM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  13905
Joined  05-15-2004

There’s any number of ways to do it. Yes, the Pages module should be doing that, or variables (perhaps a Fresh, or a regular Global Variable?). Or you use a “static” weblog, even if it only contains one entry, no harm in that.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 15 May 2008 10:30 AM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  789
Joined  02-15-2008

That’s another way of doing it!

@shinka Yes, almost every website I’ve worked on requires some ‘static’ content but the fact that you can republish it has worked for me as more of a pro than a con. It also adds a neat element of version control - client can either edit the existing entry or post a new one.

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
Posted: 15 May 2008 10:48 AM   [ Ignore ]   [ # 8 ]  
Summer Student
Avatar
Total Posts:  16
Joined  03-19-2008

Ingmar…what’s a ‘static’ weblog? Perhaps something I missed when going through the documentation?
Andy, yes I agree, and I think, as a whole, ExpressionEngine just blows everything else out of the water, I just know that some clients are dumb as boards and making it easy as possible for them is a good thing.
Thanks for your quick responses, as well. I’m beginning to believe the hype that this is one of the best support forums on the web.

Profile
 
 
Posted: 15 May 2008 11:04 AM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  13905
Joined  05-15-2004

Just a weblog you designate as that, static. One that holds all your snippets and pieces of text. You can call it what you want, of course.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62440 Total Logged-in Users: 21
Total Topics: 76709 Total Anonymous Users: 13
Total Replies: 414412 Total Guests: 570
Total Posts: 491121    
Members ( View Memberlist )