Current User: Guest
Please consider registering

 
Search Forums:


 




How do I use AJAX Navigation?

Post

Aaron - Admin

2:01 pm - January 11, 2009

posts 382

 
1

Post edited 5:11 pm - March 19, 2009 by Aaron


This module may be a little more difficult than others to use depending on what features you have and what theme you are using.

  1. Open the aWP Admin Panel (it is listed under the presentation tab)
  2. Ensure “AJAX Navigation” module is active, and activate it if it isn’t.
  3. Go to the navigation tab of the AWP admin panel.
  4. Ensure that AJAX navigation is enabled
  5. Check the options in the first box that you want to use.
  6. Test your website. If it works and there are no weird display glitches, you are done, if it doesn’t follow the instructions below.

Editing your theme to work with AJAX Navigation.

This depends on the way your theme is set up. The instructions will not work on all themes. The goal of these instructions is to edit your theme to wrap all of the content that changes in <div id="awp_loop"><!--awp_loop--> and <!--awp_loop--></div>

Open your index.php page.

Look for the lines: <?php get_header();?>, <?php get_sidebar();?><?php get_footer();?>

If <?php get_header();?> and <?php get_sidebar();?> are closer to each other than <?php get_sidebar();?> and <?php get_footer();?>, open your theme’s sidebar.php file and footer.php file.

If <?php get_sidebar();?> and <?php get_footer();?> are closer to each other open your theme’s header.php file and sidebar.php file.

If there is no <?php get_sidebar();?> function in your index.php file, open header.php and footer.php.

Regardless of the way your theme is set up, at the BOTTOM of the FIRST file, add <div id="awp_loop"><!--awp_loop--> and at the TOP of the SECOND file add <!--awp_loop--></div>.

Aaron - Admin

10:16 am - March 19, 2009

posts 382

 
2

When AJAXing the entire website, there are a few ways to avoid AJAXing specific links:

1) You can exclude types of links based on simple matching with the URL by adding the keywords to "Exclude links with XXX in them" option.

2) Any link with an onclick attribute is ignored.

3) Any link with a rel attribute that includes the term noajax is excluded.

3) Links with a target of _top or _blank are also excluded (this is useful if you use the WordPress blogroll for navigating to specific parts of your own website.)

Thomas Norberg - Guest

9:07 am - July 16, 2009

 
3

Hey I love this plugin it puts everything all in one.

But I have a problem configuring the navigation settings. I tried activating the module and it does not work with that. Then I tried the AWP documentation part by adding the <div id="awp_loop"><!--awp_loop--> and all of that to certain theme files and still comes up without it.

So any suggestions would be helpful

William - Guest

7:01 pm - August 12, 2009

 
4

How can I get this plugin to work with a graphic based navigation?

Thanks

Aaron - Admin

10:39 am - August 15, 2009

posts 382

 
5

Like an image map or flash? Flash, you are out of luck most of the time, but you just need to add the javascript call to the image map. The JS function is: awp_nav_click(this);

Matthew Mitchell - Guest

10:34 am - September 5, 2009

 
6

Post edited 2:35 pm - September 5, 2009 by Matthew Mitchell


The post excerpt expansion works fine but I want the navigation to work as well.

On my website I've edited the theme accordingly. I removed the default navigation links from the theme which are:

  1. <div class="navigation">
  2. <div class="alignleft"></div>
  3. <div class="alignright"></div>
  4. </div>

The AJAX links take the old links place. However, when I click them, the page refreshes yet tries to update with AJAX at the same time. This happens in Safari. It works in Firefox. In Opera the links refresh the page and no AJAX is used. I'm glad it works in Firefox but Opera and Safari should work as well.

What file should I change to alter the loading gif? I want something to better suit my website.

Finally, these links are fine with search engine bots aren't they?

Thank you.

case2000 - Member

3:04 pm - September 28, 2009

posts 2

 
7

Hey Aaron,

Great plugin! I'm trying to use it to enable a persistent Flash header on my blog-in-development. (I think this plug-in has the potential to enable a new breed of mutant wordpress/Flash hybrids). So I'd be using javascript and ExternalInterface to communicate back and forth between Flash and AWP. First off I'm trying to get Flash to trigger a category navigation. Clicking one of the grey category boxes in the header fires off a javascript function:

function jsSetCat(value) {

aWP.doit({'cat_id': value, 'type': 'nav', 'ths': this, 'nav': 'cat', 'i' : 'awp_loop', 'force' : 1 });

}

Is this even close to a valid method of triggering a nav event via pure javascript? Obviously it's not working... though it DOES break the ajaxnav functionality after the first attempt, so at least it's doing SOMETHING. :u)

I'm sorry if my question was answered in another post - this seemed to be the closest one. Could you clarify what you meant by the above: "Flash, you are out of luck most of the time." ?

Thanks for any help you can provide, even if it's just pointing me in the right direction. If I can get this working AWP will be a major component of my new web presence, and a donation/links would most definitely be in order.

Thanks!

-Case

case2000 - Member

3:20 pm - September 28, 2009

posts 2

 
8

Wow - I just stumbled on the solution:

aWP.doit({'cat_id': value, 'type': 'nav', 'nav': 'cat', 'i' : 'awp_loop', 'force' : 1 });

I just removed the  "'ths': this" param, and now it works! Now I'm going to work on shoe-horning a listener in there that will tell Flash when nav events triggered by AWP occur... thoughts?


Aaron - Admin

3:51 pm - September 30, 2009

posts 382

 
9

case2000 said:

I just removed the  "'ths': this" param, and now it works! Now I'm going to work on shoe-horning a listener in there that will tell Flash when nav events triggered by AWP occur... thoughts?


The "ths" allows AWP to pass the exact link that was clicked along for things like error urls etc.As for the listener, I barely have any flash experience, so i'm not sure what exactly is available, but if you look into the compatibility module, you can see how to add custom JavaScript actions to be run after AWP loads the page.

A basic example is:

  1. add_filter('awp_ajax_nav_actions', awp_compatible);
  2. function awp_compatible($actions){
  3. $actions[] = 'setTimeout("try{Lightview.updateViews();}catch(e){}",2000);'; //lightview
  4. return $actions;
  5. }

Jerome - Guest

12:47 am - October 28, 2009

10

Post Awaiting Approval by Forum Administrator



Reply to Topic: How do I use AJAX Navigation?

NOTE: New Posts are subject to administrator approval before being displayed

Name (Required):

EMail (Required):

Website):

Topic Reply:

HTML Editor
Save New PostSmileysOptions

Guest URL (required)

Math Required!
What is the sum of:
5 + 12
   

 
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell

 
 

About the Ajaxed WordPress forum

Most Users Ever Online:

35


Currently Online:

7 Guests

Forum Stats:

Groups: 1

Forums: 3

Topics: 186

Posts: 487

Membership:

There are 1177 Members

There have been 149 Guests

There is 1 Admin

There are 0 Moderators

Top Posters:

jakemc - 5

fromgrannie - 5

flash - 4

BAM - 4

Siam - 4

tombyrnes - 4

Administrators: Aaron (382 Posts)