Go Back   Web Scribble Forums » webJobs » webJobs 3 » How Do I...
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2010, 04:26 PM
Junior Member
 
Join Date: Feb 2010
Posts: 4
Default Adding new menu

Hi There,
Any one knows how to add new menu. I want to put new drop down menu with sub menu items.
Reply With Quote
  #2 (permalink)  
Old 03-03-2010, 10:23 AM
Junior Member
 
Join Date: Mar 2010
Posts: 17
Default

yes it will be helpful to know how to add additional menus if required. the second thing that would be helpful to know is how to delete a custom page once its created through smartway? as after the creation of any page the only options available are to edit and deletion is not available.
Reply With Quote
  #3 (permalink)  
Old 03-07-2010, 09:26 PM
Junior Member
 
Join Date: Dec 2009
Posts: 5
Default

I would like to know this as well.
Reply With Quote
  #4 (permalink)  
Old 03-10-2010, 12:32 PM
Web Scribble Staff
 
Join Date: Jul 2009
Posts: 280
Default

Hi,

The top menu files are located in themes/sleek_black/menu/
You'll see three folders there: seeker, employer, guest. Each folder represents a user type. So when seeker browses site, templates from seeker folder is used, etc. If you now open guest folder, you'll see five files that represent menu items there. For example themes/sleek_black/menu/guest/guest_menu_home.html is used when guest browses home page. So if you remove something from it, then go to home page and make sure you are guest (not logged in), you'll see your changes. If you log in or navigate away from this page, you won't notice changes because another template is used. Using these templates you can edit your top menu.

Now let's edit the dropdown part of menu. On that same template file you can see lines like this
Code:
<?php if (is_file($application->output['sub_menu_account'])){require $application->output['sub_menu_account'];} ?>
Basically this line includes another template that has code for this specific submenu. This template is located here:
templates/menu/guest/guest_submenu_account.html
Just like the previous folder, templates/menu/ has three folders inside that represent user types. If you navigate inside guest folder, you'll see that there are more files here. You can ignore files starting with guest_menu_ however files starting with guest_submenu_ are the files that we need. If you are good with PHP you can refer to engine/pages/menu.php to see how webJobs decides which template to use however this is not really needed because it is easy to guess that. So e.g. the dropdown under Find Jobs tab (if you are guest) is located in
templates/menu/guest/guest_submenu_find_job.html

You can also use HTML from any of these submenu (dropdown) templates to add a new dropdown. For example take the contents (without PHP part at the top) of
templates/menu/guest/guest_submenu_account.html
Code:
<ul id="submenu">

	<li><a href="index.php?page=edit_seeker1"><?php echo $text["subtab_edit_info"]; ?></a></li>

	<li><a href="index.php?page=edit_preferences"><?php echo $text["subtab_my_pref"]; ?></a></li>

	<li class="noline"><a href="index.php?page=edit_seeker2"><?php echo $text["subtab_my_profile"]; ?></a></li>

</ul>
and copy it to themes/sleek_black/menu/guest/guest_menu_home.html under Home tab
Code:
<?php

// Do Not Modify the Next Few Lines

$application =& application();

$output = $application->output;

$text = $application->text();

// You can modify from here down except the php scripting symbol

?>

<div id="main_tab">

  <ul class="sf-menu">

  	<li id="current">

  		<a href="index.php"><?=$text['tab_home']?></a>

                !!!!!!!!!!COPY HERE!!!!!!!!!!
  	</li>

  	<li>

  		<a href="?page=seeker_home"><?=$text['tab_my_account']?></a>

  	    <?php if (is_file($application->output['sub_menu_account'])){require $application->output['sub_menu_account'];} ?>

  	</li>

  	<li>

  		<a href="?page=quick_search"><?=$text['tab_find_jobs']?></a>

  	    <?php if (is_file($application->output['sub_menu_find_job'])){require $application->output['sub_menu_find_job'];} ?>

  	</li>

  	<li>

  		<a href="?page=resumes"><?=$text['tab_post_resume']?></a>

  	</li>

  	<li>

  		<a href="?page=register_seeker"><?=$text['tab_register']?></a>

  	</li>

  	<li>

  		<a href="?page=register_employer"><?=$text['tab_employer']?></a>

  	</li>

  </ul>

</div>
You'll get something like this
Code:
<?php

// Do Not Modify the Next Few Lines

$application =& application();

$output = $application->output;

$text = $application->text();

// You can modify from here down except the php scripting symbol

?>

<div id="main_tab">

  <ul class="sf-menu">

  	<li id="current">

  		<a href="index.php"><?=$text['tab_home']?></a>
		<ul id="submenu">

		<li><a href="index.php?page=edit_seeker1"><?php echo $text["subtab_edit_info"]; ?></a></li>

		<li><a href="index.php?page=edit_preferences"><?php echo $text["subtab_my_pref"]; ?></a></li>

		<li class="noline"><a href="index.php?page=edit_seeker2"><?php echo $text["subtab_my_profile"]; ?></a></li>

	</ul>

  	</li>

  	<li>

  		<a href="?page=seeker_home"><?=$text['tab_my_account']?></a>

  	    <?php if (is_file($application->output['sub_menu_account'])){require $application->output['sub_menu_account'];} ?>

  	</li>

  	<li>

  		<a href="?page=quick_search"><?=$text['tab_find_jobs']?></a>

  	    <?php if (is_file($application->output['sub_menu_find_job'])){require $application->output['sub_menu_find_job'];} ?>

  	</li>

  	<li>

  		<a href="?page=resumes"><?=$text['tab_post_resume']?></a>

  	</li>

  	<li>

  		<a href="?page=register_seeker"><?=$text['tab_register']?></a>

  	</li>

  	<li>

  		<a href="?page=register_employer"><?=$text['tab_employer']?></a>

  	</li>

  </ul>

</div>
Now if you are a guest and you go to home page, you'll notice that there is a new drop down under this tab. You can edit that piece of code that you copied and add/remove new entries by adding/removing <li> entries.

Please let me know if you have any questions or experience problems with anything.




Unfortunately it's not possible to delete a custom page from smartway. To do so you'll need to delete this page from engine/pages/, templates/ and themes/your_current_theme/
For example the files may be
engine/pages/my_custom_page.php
templates/my_custom_page.html
themes/sleek_black/my_custom_page.html

If you are using orange_green theme, you'll need only the first two files, the third (themes) file will be missing in this case.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 11:14 AM.