Sunday July 06 2008
Conditionals with EE
update
solved this problem by changing the if from category_url_title ==”“ to if segment_4 ==’‘
———-
Below is a question I’ve posted on the EE forums regarding my use of conditonals on the business site. Everything looks right to me, but it’s not working. I’m not sure if it’s just not possible or I’ve forgotten something or screwed up my semantics. I’m pretty sure that I’ve forgotten soemthing. Will wait and see for a response.
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}
Sean. inscribed these words of wisdom on Sunday Jul 6, 2008 at 01:35 PM | tags: ee thread, code, expressionengine |





