Conditional…Empty|OrThis?
Posted: 09 November 2005 08:27 AM   [ Ignore ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6086
Joined  08-04-2002

Is there a way to use an {if} statement that pipes “empty” and something else?
——-
These work individually but not in combination…
{if xyz == “”}
{if xyz == “something”}

{if xyz == “”“|something”}
——-
Trying to get this to work in some combination with URL-Segments.
I’ve tried the opposite…
{if xyz != “a|b|c”}
It works but it would mean every time a new section is added, I would have to add that into the template, don’t want to have to do that. Needs to take that into account automatically.

Profile
 
 
Posted: 09 November 2005 08:43 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12755
Joined  04-29-2002

Did you see this post from Paul: Stretching the Metal Muscles

Example:

{if group_id == "1" AND member_id != "1"}
// Every superadmin but the first one
{/if}

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 09 November 2005 09:24 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  548
Joined  01-05-2005

I’m sure I’ve just done this before

{if xyz == "|something"}

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 09 November 2005 09:29 AM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6086
Joined  08-04-2002

Sue…ya, I did see that but hadn’t had time to read through it all. Can’t wait.
Now, I just need to find a virgin to sacrifice or a dragon to send to Paul grin
———-
On a different note…I could also use…
{if segment_2 == “”}{segment_2 == “something”}{/if}
and…
{if segment_2 ==”“}{redirect == “http://www.xyz.com/abc.html”}{/if}

Profile
 
 
Posted: 09 November 2005 09:30 AM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6086
Joined  08-04-2002

{if xyz == "|something"}

Hmmm…will have to try that :-)

Profile
 
 
   
 
 
‹‹ Feed for a category      Magpie Error ››
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: 66391 Total Logged-in Users: 31
Total Topics: 84716 Total Anonymous Users: 20
Total Replies: 454701 Total Guests: 201
Total Posts: 539417    
Members ( View Memberlist )