I'm trying to create a mobile K2 site and am using the Gavern framework for the mobile/desktop switch.
For some it seams to go alright but some I can't get to work.
I'm currently working on the K2/catagory.php and catagory_item.php and it looks like the Gavern framewrk is showing my mobile and desktop code at once.
I've added some HTML comments to my catagory.php and it looks like this:
- Code: Select all
DIRECT ACCESS AND DEFAULT IMAGE SIZE PHP CODE
<!-- xiphias/catagory_item -->
<!-- gavern:mobile -->
<gavern:mobile>
<!-- Start K2 Item Mobile Layout -->
MOBILE CODE
<!-- End K2 Item Mobile Layout -->
</gavern:mobile>
<!-- /gavern:mobile -->
<!-- gavern:desktop -->
<gavern:desktop>
<!-- Start K2 Item Desktop Layout -->
DESKTOP CODE
<!-- End K2 Item Desktop Layout -->
</gavern:desktop>
<!-- /gavern:desktop -->
When I set Firefox to Android and view the site, http://j25.xiphias.net/index.php?option ... Itemid=430, the generated code looks like this:
- Code: Select all
HTML CODE UPTO K2
<!-- xiphias/catagory -->
<!-- Start K2 Category Mobile Layout -->
HTML
<!-- End K2 Category Mobile Layout -->
<!-- Start K2 Item Desktop Layout -->
HTML
<!-- End K2 Item Desktop Layout -->
</gavern:desktop>
HTML
<!-- xiphias/catagory_item -->
<!-- Start K2 Item Mobile Layout -->
<!-- End K2 Item Mobile Layout -->
HTML
<!-- xiphias/catagory_item -->
<!-- Start K2 Item Mobile Layout -->
HTML
<!-- End K2 Item Mobile Layout -->
HTML
<!-- xiphias/catagory_item -->
<!-- Start K2 Item Mobile Layout -->
HTML
<!-- End K2 Item Desktop Layout -->
HTML
<!-- xiphias/catagory_item -->
<!-- Start K2 Item Mobile Layout -->
HTML
<!-- End K2 Item Desktop Layout -->
HTML
<!-- xiphias/catagory_item -->
<!-- Start K2 Item Mobile Layout -->
HTML
<!-- End K2 Item Desktop Layout -->
HTML
<!-- xiphiass/catagory_item_links -->
<!-- Start K2 Item Layout (links) -->
HTML
<!-- End K2 Item Layout (links) -->
HTML
<!-- End K2 Category Desktop Layout -->
</gavern:desktop>
HTML
Looks like the complete code is shown in catagory.php while it should only load the mobile code.
Any help is welcome.
-XiP