Summary when listed
Posted: 17 May 2008 01:47 AM   [ Ignore ]  
Grad Student
Rank
Total Posts:  35
Joined  05-15-2008

I want to display only the “summary” if the page is displaying more than 1 entry.

I have the default code:

{exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="15" disable="member_data|trackbacks"}
<div class="entry">
<
h2 class="title">{title}</h2>
{summary}

{body}

{extended}
....

But if I delete “{body}{extended}” when I click on the Permalink, it displays only the summary.
So I guess I have to insert an {if} between those.

This was solved using two templates, one with {summary} that links to the other, with full body and extended tags.
Now trying to do it without reloading the hole page.

Profile
 
 
Posted: 20 May 2008 12:32 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  275
Joined  01-25-2006

mencargo, I suspect you need to think about this in a slightly different way. What you display depends on the link to the page - the link will tell EE what it should display and how. The only reason I can think of where you would have a page displaying more than one entry is where you have a list of entries - therefore you would have one template for that and then another template for showing the individual entries.

EE does take a little while to get your head around but there are now some good tutorials - have a look at Mike Boyink’s tutorial and his EE training site.

 Signature 

“All men are equal. All men, that is, who possess umbrellas.” E.M. Forster
--
Artscape
Chris O’Donoghue Chelsea Garden Designer
The Greenwich and District Narrow Gauge Railway Society
Croydon RFC

Profile
 
 
Posted: 20 May 2008 12:42 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  35
Joined  05-15-2008

Thank you, I just made new templates and it worked fine.
Now, for a little improvement, is it possible to change the URL and the content “block” without reloading the entire page?
Is there a way to do this with templates, or does EE have this feature somewhere?
It sounds like AJAX to me, but I don’t know if it can change the URL, because I would like to be able to copy the URL, the URL is not a MUST, but it would be nice.

Browsing between news, summary and full articles, comments, etc… without reloading the rest of the page.

Profile
 
 
Posted: 20 May 2008 01:01 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  275
Joined  01-25-2006

Well the quick answer there is that if you change the URL you have effectively changed the location of the page. If you just want the URL in the browser address bar not to change then you could use a frame (nobody uses frames anymore!). If you want to change the content block you could load more than one piece of content into the page and display only one part of it at one time - you could use small tabs for this for example. If you want to pull in fresh content then you will need Ajax. All depends on what you are trying to accomplish.

 Signature 

“All men are equal. All men, that is, who possess umbrellas.” E.M. Forster
--
Artscape
Chris O’Donoghue Chelsea Garden Designer
The Greenwich and District Narrow Gauge Railway Society
Croydon RFC

Profile
 
 
   
 
 
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: 60719 Total Logged-in Users: 19
Total Topics: 73172 Total Anonymous Users: 14
Total Replies: 394653 Total Guests: 496
Total Posts: 467825    
Members ( View Memberlist )