I have a recruitment site with clonable pages for job vacancies http://cassidyeducation.co.uk/vacancies/
the vacancies are listed using vacancies_list.php in the snippets folder.
On this page I have a dropdown with a list of job types, these are folders that each job is attached to.
the problem I have is that the default setting for the dropdown is a generic catch all called 'All' that just shows all vacancies but it does not show the folder title (job type), but if I select a folder type(job type) from the drop down it shows the folder titles(job types). I dont know where I am going wrong
the problem is in the else statemen oif the vacancies_list.php below
please help before I go grey
here is the code for the vacancies_list.php in the snippets files
also here are the declarations for the field types in the main vacancies page
and the main vacancy page code
the vacancies are listed using vacancies_list.php in the snippets folder.
On this page I have a dropdown with a list of job types, these are folders that each job is attached to.
the problem I have is that the default setting for the dropdown is a generic catch all called 'All' that just shows all vacancies but it does not show the folder title (job type), but if I select a folder type(job type) from the drop down it shows the folder titles(job types). I dont know where I am going wrong
the problem is in the else statemen oif the vacancies_list.php below
please help before I go grey
here is the code for the vacancies_list.php in the snippets files
- Code: Select all
<h2>Current Vacancies</h2>
<cms:set current_folder_name = k_folder_name/>
<form action="<cms:show k_folder_link/>" enctype="multipart/form-data" method="post" class="form11" name="vacanciesFrom">
Currently showing:
<select id="jobgroup" name="jobgroup" onchange="getval(this);">
<option value="http://cassidyeducation.co.uk/vacancies.php">All</option>
<cms:folders masterpage='vacancies.php'>
<option value="<cms:show k_folder_link/>" <cms:if k_folder_name == current_folder_name> selected="true"</cms:if>>
<cms:show k_folder_title />
</option>
</cms:folders>
</select>
</form>
<hr>
<cms:if k_is_folder>
<cms:pages masterpage='vacancies.php' folder=k_folder_name>
<br>
<form action="<cms:show k_page_link />" enctype="multipart/form-data" method="post" class="form11">
<div id="part_vacancy_table">
<table border='0' width="100%">
<tr>
<td id="latestVacancyList" colspan="3"><input name="vacancy_ref" type="hidden" value="<cms:show vacancyref/>"><b>Job Title:</b> <cms:show job_title/></td>
</tr>
<tr>
<td id="latestVacancyList" colspan="3">
<ul>
<li>Salary: <cms:show salary/></li>
<li>Location: <cms:show location/></li>
<li>Job Type: <cms:show k_folder_title/></li>
<li>Start Date: <cms:show startdate/></li>
</ul>
</td>
</tr>
<tr>
<td id="latestVacancyList" colspan="3">
<b>Description:</b>
<br>
<cms:excerptHTML count='56' ignore='image'><cms:show job_spec/></cms:excerptHTML>
</td>
<tr>
<td id="myaccountHeader" colspan="3"><input type="submit" Value="Full Job Spec"></td>
</tr>
</table><br><br>
</div>
</form>
</cms:pages>
<cms:else/>
<cms:pages masterpage='vacancies.php'>
<br>
<div id="part_vacancy_table">
<form action="<cms:show k_page_link />" enctype="multipart/form-data" method="post" class="form11">
<table border='0' width="100%">
<tr>
<td id="latestVacancyList" colspan="3"><input name="vacancy_ref" type="hidden" value="<cms:show vacancyref/>"><b>Job Title:</b> <cms:show job_title/></td>
</tr>
<tr>
<td id="latestVacancyList" colspan="3">
<ul>
<li>Salary: <cms:show salary/></li>
<li>Location: <cms:show location/></li>
<li>Job Type: <cms:show foldertitle/></li>
<li>Start Date: <cms:show startdate/></li>
</ul>
</td>
</tr>
<tr>
<td id="latestVacancyList" colspan="3">
<b>Description:</b>
<br>
<cms:excerptHTML count='56' ignore='image'><cms:show job_spec/></cms:excerptHTML>
</td>
<tr>
<td id="myaccountHeader" colspan="3"><input type="submit" Value="Full Job Spec"></td>
</tr>
</table><br><br>
</form>
</div>
</cms:pages>
</cms:if>
also here are the declarations for the field types in the main vacancies page
- Code: Select all
<cms:template title='Vacancies' clonable='1' order='1'>
<cms:editable
name='vacancyref'
label='Vacancy job Ref'
desc='Enter vacancy job ref here'
type='text' />
<cms:editable
name='job_title'
label='Job Title'
desc='Enter blog title here'
type='text' />
<cms:editable
name='salary'
label='Salary/rate'
desc='Enter salary/rate here'
type='text' />
<cms:editable
name='location'
label='Location'
desc='Enter location here'
type='text' />
<cms:editable
name='job_spec'
label='Job Specification'
desc='Enter Job Specification here'
type='richtext' />
<cms:editable
name='requirements'
label='Job Requirements/Experience'
desc='Enter Job Requirements/Experience here'
type='richtext' />
<cms:editable
name='startdate'
label='Start Date'
desc='Enter Start Date here'
type='text' />
<cms:editable
name='contractlength'
label='Contract length'
desc='Enter Contract length here'
type='text' />
<cms:folder name="contract" title="Contract"/>
<cms:folder name="permanent" title="Permanent"/>
<cms:folder name="temp" title="Temporary"/>
</cms:template>
and the main vacancy page code
- Code: Select all
<cms:if k_is_page>
<h1>Full Vacancy Details</h1>
<br>
<hr>
<br>
<div id="vacancyBackbtn"><a href="http://cassidyeducation.co.uk/vacancies.php"><img src="/images/buttons/vacancyBack.png"></a></div>
<div id="full_vacancy_table">
<table border="0" >
<form action="http://cassidyeducation.co.uk/apply.php" enctype="multipart/form-data" method="post" class="form11">
<input name="vacancy_ref" type="hidden" value="<cms:show vacancyref/>">
<tr>
<td id="full_vacancyHeader" colspan="3"><input type="submit" Value="Apply Now"></td>
</tr><tr>
<td id="full_vacancyHeader">Job Reference: </td>
<td colspan="2"> <cms:show vacancyref/></td>
</tr><tr>
<td id="full_vacancyHeader">Job Title: </td>
<td colspan="2"> <cms:show job_title/></td>
</tr><tr>
<td id="full_vacancyHeader">Salary: </td>
<td colspan="2"> <cms:show salary/></td>
</tr><tr>
<td id="full_vacancyHeader" valign="top">Specifications: </td>
<td colspan="2"><cms:show job_spec/></td>
</tr><tr>
<td colspan="3" height="10"></td>
</tr><tr>
<td id="full_vacancyHeader" valign="top">Requirements: </td>
<td colspan="2"><cms:show requirements/></td>
</tr><tr>
<td id="full_vacancyHeader">Location: </td>
<td colspan="2"><cms:show location/></td>
</tr><tr>
<td id="full_vacancyHeader">Start Date: </td>
<td colspan="2"><cms:show startdate/></td>
</tr><tr>
<td id="full_vacancyHeader">Contract length: </td>
<td colspan="2"><cms:show contractlength/></td>
</tr><tr>
<td id="full_vacancyHeader">Job Type:</td>
<td colspan="2"><cms:show k_page_foldertitle/></td>
</tr><tr>
<td id="full_vacancyHeader" colspan="3"><input type="submit" Value="Apply Now"></td>
</tr>
</form>
</table>
</div>
<cms:else/>
<cms:embed 'vacancies-list.php' />
</cms:if>