CMS Builder

19 posts by 3 authors in: Forums > CMS Builder
Last Post: January 3, 2008   (RSS)

By jimbly2 - January 3, 2008

Hi Dave,

thanks for that - this is the way my jobs/careers section is setup at the moment:

http://212.125.79.85/careers.php

If I understand you correctly, should I get rid of the collapsible menu on the left and simply have a couple of drop downs
at the top of the page for 'job type' and 'country'? Would this then need a 'go' button ? Or have I misunderstood?
Sorry to sound dim but I've not really done this before!

Is it possible to have the query strings attached to the current navigation? Or is this going to be overly complex...

Thamks for all your help -



best,

Jim

Re: [jimbly2] CMS Builder

By Dave - January 3, 2008

Linking for your collapsible menus is no problem, just do it like this:

jobViewer.php?country=usa&type=administrative

Just remember to url encode the values in the urls. So replace space with +. Example: South Africa would be South+Africa and "Commercial & legal" would be "Commercial+%26+legal".

I was just suggesting the pulldowns in the admin program so users would always be selecting the same values rather than having a text field. But either will work.
Dave Edis - Senior Developer
interactivetools.com

By jimbly2 - January 3, 2008

[:)] Ah! I see - brilliant. I will have a crack at that later this morning - If I can get my head firmly around this I'll be after a few more copies of CMS builder :-)

Thanks Dave,

Jim

Re: [jimbly2] CMS Builder

By Dave - January 3, 2008

Not sure if I follow exactly what you mean. You mean so they can "drill down" (select a country, then on the next page the job type in their country?).

It really depends on how you want the design. I'd just figure out exactly how you want the design to work, and then we can help you make CMS Builder do it that way.

The current design looks like it will work well. You might want to have it show all countries and types by default and then let them click on something when they want more specific results.

I hope that makes sense. :)
Dave Edis - Senior Developer
interactivetools.com

By jimbly2 - January 3, 2008

Hi Dave - I think I'm just trying to over-complicate it. The way I see it working is that if you click on, say, Africa, then a new page loads with the query string relevant to that country, thus displaying all the jobs for Africa. If you then click on Bulgaria, another page loads with the query for 'Bulgaria, etc.

I was simply wondering whether all that could be done on one page, but I think I'll keep it as straightforward as I can at the moment :-)

thanks,

Jim

Re: [jimbly2] CMS Builder

By jimbly2 - January 3, 2008

Hi Dave,

ok - I have the country ( location) working great, but I can't get it to list only the job type ( type) - this is the code I have:

<?php
require_once "C:/inetpub/wwwroot/camco_php/cmsAdmin/lib/viewer_functions.php";
$options = array(); // NOTE: see online documentation for more details on these options
// get page number and keywords
$pageNumber = @$FORM['page'] ? $FORM['page'] : 1;
$country = @$FORM['location'];
$type = @$FORM['type'];

// create custom where query
$where = "";
if ($country) { $where .= "location = '" .escapeMysqlString($country). "'"; }
if ($where && $type) { $where .= " AND "; }
if ($type) { $where .= "type = '" .escapeMysqlString($type). "'"; }

$options['tableName'] = 'jobs'; // (REQUIRED) MySQL tablename to list record from. Example: 'article';
$options['titleField'] = 'title'; // (optional) MySQL fieldname used in viewer url for search engines. Example: 'title' would display: viewer.php/article_title_here-123
$options['viewerUrl'] = 'jobsPage.php'; // (optional) URL of viewer page. Example: '/articles/view.php';
$options['perPage'] = ''; // (optional) The number of records to display per page. Example: '5'; Defaults to 10.
$options['orderBy'] = 'title'; // (optional) Fieldnames to sort by. Example: 'field1, field2 DESC, field3';
$options['pageNum'] = $pageNumber;
$options['where'] = $where;
$options['useSeoUrls'] = ''; // (ADVANCED) Set this to '1' for search engine friendly urls: view.php/123 instead of view.php?123 (not supported on all web servers, and viewerUrl must be absolute path such as '/path/viewer.php')
list($listRows, $listDetails) = getListRows($options);
// update page links
$pageLink = "{$_SERVER['PHP_SELF']}?country=" .urlencode($country). "&type=" . urlencode($type);
$listDetails['prevPageLink'] = "{$pageLink}&page={$listDetails['prevPage']}";
$listDetails['nextPageLink'] = "{$pageLink}&page={$listDetails['nextPage']}";
$listDetails['firstPageLink'] = "{$pageLink}&page=1";
$listDetails['lastPageLink'] = "{$pageLink}&page={$listDetails['totalPages']}";


?>
<!-- /STEP1: Load Record List -->

..and this is the url I'm using to call it:
"careers_type_busdev.php?job_type=Marketing"

bu it just lists all of the jobs anyay?

Any ideas?

Thanks
Jim

Re: [jimbly2] CMS Builder

By jimbly2 - January 3, 2008

Hurray - I fixed it :-)

Re: [jimbly2] CMS Builder

By Dave - January 3, 2008

hehe, ok, let us know if you get stuck on anything else! :)
Dave Edis - Senior Developer
interactivetools.com