Hey all, I'm sorry if this is a repeat question, but I just cannot seem to turn this corner. Here's the deal:
I am trying to write a JOBS page, jobs.php. I am using the non-executable TEMPLATE page, template-jobs.php, to house the editable items for jobs.
Within JOBS I'm trying to find a solution that would basiclaly do this:
-if a job exists, fill in the menu on the left column and fill in content in a right column
-else show one big content area that says "no jobs".
I can't figure out how to look for _any_ job post existing. I only have found how to find if a variable within a posting exists.
Here's some stripped down HTML for where I'm at now. In the JOBS HTML below, I've added HTML comments with notes of how I'd expect something to work.
---------------------------------------------------------------
TEMPLATE: template-jobs.php (this page seems just fine)
----------
---------------------------------------------------------------
JOBS: jobs.php
----------
Any help would be so amazing. Thanks!
I am trying to write a JOBS page, jobs.php. I am using the non-executable TEMPLATE page, template-jobs.php, to house the editable items for jobs.
Within JOBS I'm trying to find a solution that would basiclaly do this:
-if a job exists, fill in the menu on the left column and fill in content in a right column
-else show one big content area that says "no jobs".
I can't figure out how to look for _any_ job post existing. I only have found how to find if a variable within a posting exists.
Here's some stripped down HTML for where I'm at now. In the JOBS HTML below, I've added HTML comments with notes of how I'd expect something to work.
---------------------------------------------------------------
TEMPLATE: template-jobs.php (this page seems just fine)
----------
- Code: Select all
<?php require_once( 'admin-cms/cms.php' ); ?>
<cms:template title="Template - Jobs" clonable="1" executable="0">
<cms:editable name="job_title" label="Job Title" type="text" />
<cms:editable name="job_content" label="Job Content" type="nicedit" />
</cms:template>
<?php COUCH::invoke(); ?>
---------------------------------------------------------------
JOBS: jobs.php
----------
- Code: Select all
<?php require_once( 'admin-cms/cms.php' ); ?>
<cms:template title="Jobs" />
<htm>...<body>...
<!-- I expect to have an "if a job exists" logic here. -->
<!-- if_is_page & page_exists seemed incorrect -->
<ul class="job-sidebar">
<cms:pages masterpage="template-jobs.php" orderby="publish_date" order="asc">
<li><cms:show job_title /></li>
</cms:pages>
</ul>
<div class="job-content">
<cms:pages masterpage="template-jobs.php" orderby="publish_date" order="asc">
<cms:if job_title>
<h2><cms:show job_title /></h2>
</cms:if>
<cms:if job_content>
<cms:show job_content />
</cms:if>
</cms:pages>
</div>
<!-- i expect to end the "if job exists" and to have an "else do this" statement -->
<!-- I would add in the "else do this":
<div class=content-no-job">Whatever I want to say here</div>
-->
...</body></html>
<?php COUCH::invoke(); ?>
Any help would be so amazing. Thanks!