test
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • luke riverstone Friend
    #163793

    I 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 Friend
    #390517

    Hi 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 Friend
    #390566

    sorry 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 Friend
    #390726

    Hi 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 Friend
    #493162

    I 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/

Viewing 5 posts - 1 through 5 (of 5 total)

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