Duplicate start_url field in pwa settings

Chromaniac

Well-known member
So I finally did a test install of 2.2 and was just wondering if it would be possible to add a field for start_url in PWA settings. My board has a makeshift version of manifest file that works well and I prefer the installed icon to load Latest Activity page instead of home page. So the file currently has this line in it: "start_url": "/whats-new/latest-activity",.

From what I have read from other threads, it does seem that I would be able to modify the php file for this but that would probably trigger the file check system. So, it would be nice to have this field in the backend if it's not too much trouble. Thanks!
 
Upvote 0

Chromaniac

Well-known member
So, this is not a template that I can modify. I would have to change a core file. The file seems to be WebManifestRenderer.php... Code is:
Code:
$manifest['start_url'] = $this->app()->router()->buildLink(
            'index',
            null,
            ['_pwa' => 1]
        );

How do I edit it to place /whats-new/latest-activity here :p
 

Chromaniac

Well-known member
Code:
$manifest['start_url'] = $this->app()->router()->buildLink(
            '/whats-new/latest-activity',
            null,
            ['_pwa' => 1]
        );

This seems to have worked. One more warning in my backend 😥 . I am not sure how XenForo templating works but this would have been very nice to have as a template! Cheers.
 

Brogan

XenForo moderator
Staff member
Dupe.

 

Chromaniac

Well-known member
Right. Hopefully if an addon is developed eventually, it would include other options like color theme included in it. For now, I would manage with the modified core file. :)
 
Top