The Importance of Semantics: Static Pages
Posted: 30 August 2007 02:43 PM   [ Ignore ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32911
Joined  05-14-2004

Over the last few weeks, since I began writing in our blog for your reading pleasure, I have gotten a few suggestions about what to write on. These articles are to help you, so {encode=“lisa.wess@ellislab.com” title=“keep those suggestions coming!”}

Before we continue, this article is going use terms from The Importance of Semantics, so you may wish to take a moment and review that article.

Last Week,  I said we had completed the default URL handling, but you see, it doesn’t actually end there! Every site, including my own, has certain pages that are “static” in nature and would benefit from a simple URL structure. For example, almost every site has an About page. It would be really nice to easily add to and edit this type of content which is exactly what the Pages Module is for.

Pages makes managing “static” content very straightforward. A Page is identified by a few characteristics that set it apart from a standard weblog entry.

* You decide the URI when you create the entry in the Publish form’s “Pages” tab.
* When creating the entry, you choose the template to use for displaying that entry.

How, then, do we take advantage of these custom URIs so that we can have our articles appear magically wherever we want?  Well, read on!

Onwards!

 Signature 
Profile
MSG
 
 
Posted: 31 August 2007 09:44 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  368
Joined  09-20-2006

I haven’t made much use of the pages module as of yet.  I guess I am still working through hard-coded templates.  Eventually I will migrate!

Thanks for adding some detail to this!

 Signature 

“I am so clever that sometimes I don’t understand a single word of what I am saying.”

Profile
 
 
Posted: 31 August 2007 10:02 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  28
Joined  09-28-2004

I wonder if “static” is the right word to use.  With me I find it is the blog entries that remain unchanged while the pages get changed quite a lot.

Profile
 
 
Posted: 31 August 2007 10:14 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32911
Joined  05-14-2004

I don’t really love the term “static pages” either - but that is the most commonly accepted term for this kind of page, so I used it. =)

 Signature 
Profile
MSG
 
 
Posted: 31 August 2007 02:52 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  292
Joined  02-03-2005

I’ve found the pages module to be really useful. Is there a way to restrict which templates show up in the pages dropdown? Right now I’m working on a site that has about 40 different templates, but of those, there are only about 3 or 4 that could actually be used to display content. Since I’m the one who will be updating the site, it isn’t a big deal, but I can forsee it being a problem if someone else had to use it. It would be great if there was a “display in pages menu” option in the template preferences.

 Signature 

Artificial Memory

Profile
 
 
Posted: 31 August 2007 03:06 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32911
Joined  05-14-2004

There isn’t a way to do that, though it may be possible via an extension.  The way I’d see it easily happening is saying, “only show templates in this group” etc.  But I haven’t seen anyone take this up yet.

 Signature 
Profile
MSG
 
 
Posted: 01 September 2007 01:56 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  296
Joined  08-13-2003

Hi,

I think the Pages module really is an excellent addition to EE.

I’ve run into one major problem though, and that is that I have other dynamic content on the page (like a small list of recently added blog posts in the footer which is added on every page on the site through the embedded footer template). That doesn’t load if I use the Page module.

Maybe I did something wrong, but my experience is that you’re either static or dynamic. You can’t mix them. Mixing would be a great addition to the next version though.

/ Ayza

P.S. I really like your weekly blog posts, Liza. Keep up the good works!

 Signature 

Lidne Inc. :: Business by Design

Profile
 
 
Posted: 01 September 2007 11:04 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32911
Joined  05-14-2004

ayza, it should load - dynamic=“off” would normally be the reason it wouldn’t.  But if you have that and it’s still not working, go ahead and post in technical support and let’s get it ironed out.  You shouldn’t see behavior like what you describe if things are properly set up. =)

And thank you!

 Signature 
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 09:33 AM
Total Registered Members: 65027 Total Logged-in Users: 24
Total Topics: 82117 Total Anonymous Users: 15
Total Replies: 441316 Total Guests: 192
Total Posts: 523433    
Members ( View Memberlist )