[Building Sakai] how to add meta tag to an individual samigo test

Gonzalo Silverio gsilver at umich.edu
Tue Aug 5 04:21:02 PDT 2014


Untested.  Works well in the body portion of the dom, but this is the head.
Given the frame Id of the tool in a given site it goes into the framed
document and does whatever you need. Once it is working it can be minefied
and added as a site property (Admin Workspace > Sites)
as sakai:htmlInclude.

jQuery(document).ready(function(){
    var a = jQuery("<IFRAME ID>");
    if (a.length === 1) {
        jQuery(a).load(function(){
            jQuery(a).ready(function(){
                // add the meta tag
            });
        });
    }
});

It does require jQuery 1.7. If using Sakai that has an older version, a
reference to a CDN link can be included as the value of the property. So:

<script src="CDN"></script><script>Your script</script>

It is pretty vile, but has been useful in doing x to tool y in site z
scenarios.

Gonzalo

On Tuesday, August 5, 2014, Steve Swinsburg <steve.swinsburg at gmail.com
<javascript:_e(%7B%7D,'cvml','steve.swinsburg at gmail.com');>> wrote:

> If it's for all test delivery pages in samigo then yes, find the relevant
> template and add it. If it's for just one page in a specific site,  you
> could theoretically wrap that in a site id test.
>
> sent from my mobile device
> On 05/08/2014 3:44 PM, "Sanghyun Jeon" <euksa99 at gmail.com> wrote:
>
>> Hello all,
>>
>>  I have one unique samigo issue and I am wondering whether any of you
>> might have a solution for this issue.
>>
>> In the Japanese language placement test, we noticed that Chrome asks if
>> the viewer wants to see a translation of the page from Japanese into
>> English. Obviously this is not a desired feature for the foreign language
>> placement test.  Google Support says that webmaster can tell Google not to
>> translate the webpage with the following meta tag:
>>
>> <meta name="google" content="notranslate" />
>>
>> My question is that is there any way I can add this meta tag into an
>> individual Samigo test page, so that this meta tag affects only this
>> placement test, not all webpages, such as Settings page per each created
>> test.
>>
>> If not, is there any other way to achieve this purpose?
>>
>> Thank you in advance.
>>
>> S
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>> "unsubscribe"
>>
>

-- 
- Gonzalo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140805/ba479d3e/attachment.html 


More information about the sakai-dev mailing list