So I'm viewing the profile page of a user and it displays everything I want it to display. Instead of just having a list of all the fields I have them scattered around my page as my design dictates.
What I'd like to do is figure out how to not show items that aren't populated.
For instance if the user has their city and state filled in then it should output:
City: New York
State: New York
But if the zip hasn't been filled in it should NOT show:
Zip:
it should just not print the word "Zip"
Any ideas on how to accomplish this?
Thanks in advance!
2.2.4 Revolution
You can use use output modifiers (in Revolution) or PHX (in Evolution) to hide empty fields. The form will depend on what you're using to display the data and which version of MODX you're using.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
Using revo 2.2.4. It is displaying on the "profile" page of a user and I'm using the Login Package to accomplish this.
2.2.4 Revolution
OK, on the page, you'd use something like this:
[[+zip:notempty=`<p>Zip: [[+zip]]</p>`]]
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
Thanks Bob,
is there a place where all this magic stuff you have comes from? I scour documentation and never see anything of the sorts! I like to try to figure stuff out before I jump on the forums but I guess I'm looking for love in all the wrong places lol.
2.2.4 Revolution
http://amzn.to/Qfsl1Z
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
[ed. note: BobRay last edited this post 14 years, 3 months ago.]
Perfect. I was going to ask you how to make a donation for all your valuable tips, but I believe I'll buy your book instead!
2.2.4 Revolution
Sounds good. BTW, I corrected the URL in the message above.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html