COMMUNITY FORUM
Template help?
- Aaron
- Topic Author
- Offline
- Premium Member
Less
More
12 years 9 months ago #62754
by Aaron
Template help? was created by Aaron
Trying to create my own template. Currently the default template has a very nice way to display the extra fields IF they exist for each item. I want to duplicate that within my individual fields... I am able to limit but it seems that if ONE field in any record is blank, it hides that field for ALL records..
for purposes of my template, I had to change that and list each field separately (for placement as well as to limit guest access).
So here is what I did:
1. Added this code to the top of my php file:
for purposes of my template, I had to change that and list each field separately (for placement as well as to limit guest access).
So here is what I did:
1. Added this code to the top of my php file:
Aaron :)
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 9 months ago #62755
by william white
Replied by william white on topic Re: Template help?
Please Log in or Create an account to join the conversation.
- Aaron
- Topic Author
- Offline
- Premium Member
12 years 9 months ago #62756
by Aaron
Replied by Aaron on topic Re: Template help?
Thanks William! I have seen that post but my problem still exists...
Aaron :)
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 9 months ago #62757
by william white
Replied by william white on topic Re: Template help?
If you are trying to test the first element of the array, try using 0
Please Log in or Create an account to join the conversation.
- Aaron
- Topic Author
- Offline
- Premium Member
12 years 9 months ago #62758
by Aaron
Aaron :)
Replied by Aaron on topic Re: Template help?
William,
I need to test the element in the brackets. But I need to be able to test it for each item. What seems to be occurring is that if the test finds a blank in ANY item, it hides it from all - which is not what I need to happen.
Thanks for the quick replies :)
I need to test the element in the brackets. But I need to be able to test it for each item. What seems to be occurring is that if the test finds a blank in ANY item, it hides it from all - which is not what I need to happen.
Thanks for the quick replies :)
Aaron :)
Please Log in or Create an account to join the conversation.
- Aaron
- Topic Author
- Offline
- Premium Member
12 years 8 months ago #62759
by Aaron
Replied by Aaron on topic Re: Template help? SOLVED (summary and solution)
William, et al,
I figured it out!
Summary:
The extra fields will display (if present) along with their appropriate labels. When you break down the extra fields into individual components to rearrange, A new array had to be built in order to display the labels and names AND hid the labels if the fields were empty.
Solution:
1. Create the ID and Label Arrays:
I figured it out!
Summary:
The extra fields will display (if present) along with their appropriate labels. When you break down the extra fields into individual components to rearrange, A new array had to be built in order to display the labels and names AND hid the labels if the fields were empty.
Solution:
1. Create the ID and Label Arrays:
Aaron :)
Please Log in or Create an account to join the conversation.
- Uldis
- Offline
- Senior Member
Less
More
- Posts: 69
12 years 8 months ago #62760
by Uldis
Replied by Uldis on topic Re: Template help? SOLVED (summary and solution)
So great that you posted this, I espacially needed the hiding part :)
Please Log in or Create an account to join the conversation.