-
AuthorPosts
-
luke riverstone Friend
luke riverstone
- Join date:
- May 2011
- Posts:
- 9
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 1 times in 1 posts
May 10, 2011 at 12:54 am #163793I would just like to know if there is any documentation on customising the templates. In particular I would like to customise the jaview.php template.
1. What is the correct way to insert each of the items from the Jobs Forms / Jobs Table?
[PHP] <?php
for ($i=0;$i<count($this->profile_editFieldList);$i++)
if ($this->profile_editFieldList[$i]->field_name==’logo’)
{
if ($profile_list[$item->id]->logo)
echo rendfield($profile_list[$item->id],$this->profile_editFieldList[$i],false,true,true);
}
?>[/PHP]Should I just use the above code but replace the field_name with the desired field?
2. how can I set it to only display the field if there is a value? For example we have several fields that are not required. I would like them not to display if they are empty.
Vinh CV FriendVinh CV
- Join date:
- August 2009
- Posts:
- 574
- Downloads:
- 0
- Uploads:
- 2
- Thanked:
- 76 times in 72 posts
May 10, 2011 at 7:52 am #390517Hi luke riverstone,
1. What is the correct way to insert each of the items from the Jobs Forms / Jobs Table?
JAJobBoard dynamically generates Job details page, fields in Job Form are stored in $this->fieldlist variable.[PHP]
for ($i=0;$i<count($this->fieldlist);$i++)
if ($this->fieldlist[$i]->field_name==’logo’)
{ }
}
[/PHP]2. How can I set it to only display the field if there is a value?
=>
You can check the return data of function “rendfield()”luke riverstone Friendluke riverstone
- Join date:
- May 2011
- Posts:
- 9
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 1 times in 1 posts
May 10, 2011 at 11:41 am #390566sorry I don’t quite understand what you mean by check the return data function. I am still new to PHP.
I thought that for the code that I pasted above the
[PHP] echo rendfield($profile_list[$item->id],$this->profile_editFieldList[$i],false,true,true);
} [/PHP]was to allow the owner of the post if logged in to edit the post. Can you give an example of how the code I posted should look if the ‘rendfield()’ function set to only show the field if it is not blank.
regards,
Vinh CV FriendVinh CV
- Join date:
- August 2009
- Posts:
- 574
- Downloads:
- 0
- Uploads:
- 2
- Thanked:
- 76 times in 72 posts
May 11, 2011 at 7:07 am #390726Hi luke riverstone,
“To allow the owner of the post if logged in to edit the post”: JAJobBoard has an edit button in job details page after employers log in and view their job details.
An example to check:
[PHP]
if ( rendfield(ARGUMENTS_HERE) != “” )
[/PHP]
brentwilliams2 Friendbrentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
May 17, 2013 at 3:23 pm #493162I realize this is an old post, but I’m sure others might stumble upon it like I did. So for everybody else, I have done some work on figuring out how to show each of the common fields in a custom ja view template. Hope this helps: http://www.joomlart.com/forums/topic/how-to-customize-the-job-viewtemplate-jaview-php/
1 user says Thank You to brentwilliams2 for this useful post
-
AuthorPosts
This topic contains 5 replies, has 3 voices, and was last updated by brentwilliams2 11 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum