動的リンクを生成して、ユーザーの屋外ダッシュボードに配置したいと考えています。リンクは "inbox" で、http://www.mysite.com/preauth.jsp?email=hello@domain.comの形式である必要があります。リンクの唯一の動的部分は、現在ログインしているユーザーの電子メール アドレスである hello@domain.com です。
alresco コミュニティ 4.2a の使用
動的リンクを生成して、ユーザーの屋外ダッシュボードに配置したいと考えています。リンクは "inbox" で、http://www.mysite.com/preauth.jsp?email=hello@domain.comの形式である必要があります。リンクの唯一の動的部分は、現在ログインしているユーザーの電子メール アドレスである hello@domain.com です。
alresco コミュニティ 4.2a の使用
ダッシュレットを使用してこれを実装したい場合は、github で will のサンプル ダッシュレットを参照してください: https://github.com/share-extras/sdk-sample-dashlet
必要なのは、ダッシュレットの ftl を変更することだけです。
...normal html
<a href ="http://www.mysite.com/preauth.jsp?email=${user.email}">link</a>
もう 1 つの方法は、リンクを Alfresco Share のヘッダーに追加し、次の項目を追加することです ( http://wiki.alfresco.com/wiki/Share_Header ):
<item type="external-link" id="pre-auth">http://www.mysite.com/preauth.jsp?email={useremail}</item>
{useremail} はここでは不明なトークンであるため、site-webscripts\org\alfresco\components\header\header.get.html.ftl をカスタマイズしてそこにトークンを追加する必要があります (申し訳ありませんが、4.1 コードのみを使用していません)。 4.2 インプレースがある):
<script type="text/javascript">//<![CDATA[
var ${jsid} = new Alfresco.component.Header("${jsid}").setOptions(
{
siteId: "${page.url.templateArgs.site!""}",
siteTitle: "${siteTitle?js_string}",
minSearchTermLength: ${args.minSearchTermLength!config.scoped["Search"]["search"].getChildValue("min-search-term-length")},
tokens:
{
site: "${page.url.templateArgs.site!""}",
pageid: "${page.url.templateArgs.pageid!""}",
userid: "${user.name?js_string}",
useremail: "${user.email?js_string}",
}
}).setMessages(${messages});
Alfresco.util.createTwister.collapsed = "${collapsedTwisters?js_string}";
//]]></script>