help with categories and conditionals
Posted: 05 July 2008 10:24 PM   [ Ignore ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2081
Joined  05-13-2004

I’ve got a template set up for services with the code below. Everything works fine except that the read more link appears when on a single category listing. I want it to appear on the complete listing like it does, but not once you click through it.

Is there a conditional I can wrap the code it or am I going to have to set up a new template?

{exp:weblog:category_heading}
{
/if}
<h1>{category_name}</h1>
{if category_description}
{
/if}

<br />

{/exp:weblog:category_heading}


{exp
:weblog:entries weblog="CsWebDesign" limit="50" disable="member_data|pagination|trackbacks" orderby="title" sort="asc" uncategorized_entries="n"}

<h3>{title}</h3>
{categories}{exp:trunchtml chars="150" inline="_... <a href='{path=createsean/services}'>read on</a>"}{/categories}
{cs_body}
{
/exp:trunchtml}

{
/exp:weblog:entries}

I’ve got this conditional set up but nothing is happening with it - am I missing something or maybe this just can’t be done.

{if category_url_title ==""}
{categories}{exp
:trunchtml chars="150" inline="_... <a href='{path=createsean/services}'>read on</a>"}{/categories}
{cs_body}
{
/exp:trunchtml}
{if
:else}
{cs_body}
{
/if}
 Signature 

CreateSean Web Design | EE Forums 4 You ExpressionEngine forum customization
on twitter @createsean I am the poster formally known as The Linguist.

Profile
 
 
Posted: 06 July 2008 04:18 AM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2081
Joined  05-13-2004

Problem resolved. After reading the docs a little more I found the solution.

I changed,

{if category_url_title ==""}

to

{if segment_4 ==''}
 Signature 

CreateSean Web Design | EE Forums 4 You ExpressionEngine forum customization
on twitter @createsean I am the poster formally known as The Linguist.

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 09:33 AM
Total Registered Members: 77543 Total Logged-in Users: 42
Total Topics: 101543 Total Anonymous Users: 31
Total Replies: 544332 Total Guests: 291
Total Posts: 645875    
Members ( View Memberlist )