KT Walrus Posted June 6, 2019 Posted June 6, 2019 Not sure what to call this, but in the lang files I see the href attributes set to an external value: 'filehandler__Amazon_bucket_desc' => "You can create a bucket in your <a href='{external.amazons3_buckets}' target='_blank' rel='noopener'>S3 Management Console</a> How do I add my "external.my_url" if my lang bit is: 'click_here' => "Click <a href='{external.my_url}' target='_blank' rel='noopener'>here</a>!" Where is this documented? I searched but came up empty.
Martin A. Posted June 6, 2019 Posted June 6, 2019 Those are just shortcuts to \IPS\Http\Url::ips( 'docs/' . "my_url" ). Don't see why you would need this, can't you just enter the proper URL? Or do you also need a way to dynamically create links containing the current installed version, which is all that "ips()" method does.
KT Walrus Posted June 6, 2019 Author Posted June 6, 2019 2 minutes ago, Martin A. said: Those are just shortcuts to \IPS\Http\Url::ips( 'docs/' . "my_url" ). Don't see why you would need this, can't you just enter the proper URL? Or do you also need a way to dynamically create links containing the current installed version, which is all that "ips()" method does. Thanks. I thought this was a way to separate the URLs into one settings table and then use aliases to reference the URLs in the code. Being an IPS shortcut doesn't do what I want. I will stick with holding these URLs in my app's settings (so they can be updated, if needed), rather than in the lang bits using some templating syntax to specify external URLs.
bfarber Posted June 7, 2019 Posted June 7, 2019 As mentioned, the URL pattern referenced ultimately passes a shortcut code through our documentation endpoint, which allows us to adjust where to send users when they click documentation links (i.e. if we create a new separate article for a new version). It won't be of any use for you I'm afraid, and you'll need to either hardcode the URL into the language file or reference it in some other manner (e.g. %s and then swap out with \IPS\Settings::i()->whatever).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.