2

I want to make a jQuery-mobile addon for atk4 (version 4.3.1).

In test case I want to conditionally override the template path by prepending a location to pathfinder's 'template' locations from my addon.

How can I do it?

gaabora
  • 332
  • 2
  • 6

1 Answers1

2

Agile Toolkit default installation exposes only /<app>/public/ folder. The ZIP file available form agiletoolkit.org actually has a copy of vendor/atk4/atk4/public/atk4 inside /frontend/public and /admin/public.

Your best option right now is to instruct user to copy (or symlink) folder inside their "public" folder.

We are working on "activation-hook" which could be used by Add-on developers to install public assets, but it's not finalized yet.

You might also have to look into $app->pm->public_location and use defineContent() to conditionally list your sub-folder. This location is looked into before $app->pm->atk_location so will take precedence.

use PathFinder_Location::defineContents to list your assets.

romaninsh
  • 10,606
  • 4
  • 50
  • 70
  • Thanks for reply, Romans! I think for now making a full functional addon is too complex task Tempoparly resolved by overriding template in addDefaultLocations() function from separate mobile frontend. function addDefaultLocations() { $this->addLocation(array( 'template' => 'mobile' )) ->setBasePath(getcwd()); } – gaabora Mar 20 '16 at 07:43