Load different css for one master page in different variation labels

Hi
i have two variation label in my SharePoint 2013 site collection
one for English language 
and one for the Arabic language 
i have used the twitter bootstrap so now i have one master page and one style file for the two sites
i need to load custom css for Arabic to handle the RTL so how can load English style and Arabic style 
should i use cssregistration and how 
or any suggestion please :)

Hi,
We can use jQuery to add the css file based on some conditions, the following code for your reference:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
$( function() {
if ($("#label1").val()== "English") {
$("<link href='css/custom-en.css' rel='stylesheet' type='text/css' />").appendTo('head');
} else if ($("#label2").val() == "Arabic") {
$("<link href='css/custom-ar.css' rel='stylesheet' type='text/css' />").appendTo('head');
</script>
Best Regards
Dennis Guo
TechNet Community Support

Similar Messages

  • Different Layout within a webflow for one Portal Page

    Hi All,
    Can I set different layouts within one portal page journey depending on the hyperlink
    I click on one of the portal page with in a webflow.
    My requirements is such that if user clicks on one of the link on one of the portlet,
    I want to show them the next page with different content in a different layout
    with in same portal page journey.
    Can anyone post the sample code to achieve this.
    Thanks
    Nitin

    1 - you can not change the photo frame size if that is what you are asking
    2 - you can enlarge the photo within the frame by selecting it and using the slider above the frame
    3 - you can use a different page layout -- or even theme -- see Liz Castro's web site for examples of all available layouts for each theme -- http://www.lizcastro.com/iphotobookthemes/
    LN

  • Script for switching master pages

    Would it be possible to write a script to do this: Replace one master page with another whenever a certain paragraph style appears? I'm looking for a quick way to replace my A Master (with running header and page number) with the None Master on pages where new chapters begin.
    Clark

    here you go (it also creates sections)
    var ProgressBar = function(/*str*/title){
         var w = new Window('palette', ' '+title, {x:0, y:0, width:340, height:60}),
              pb = w.add('progressbar', {x:20, y:12, width:300, height:12}, 0, 100),
              st = w.add('statictext', {x:10, y:36, width:320, height:20}, '');
         st.justify = 'center';
         w.center();
         this.reset = function(msg,maxValue)
              st.text = msg;
              pb.value = 0;
              pb.maxvalue = maxValue||0;
              pb.visible = !!maxValue;
              w.show();
         this.hit = function() {++pb.value;};
         this.hide = function() {w.hide();};
         this.close = function() {w.close();};
    function main(){
    var doc = app.documents.item(0);
    // Create a list of paragraph styles
    var list_of_paragraph_styles = [];
    var all_paragraph_styles = [];
    var list_of_masters_names=[];
    var list_of_masters=[];
    for (var i= 0; i<doc.masterSpreads.length;i++){
        list_of_masters_names.push(doc.masterSpreads[i].name);
        list_of_masters.push(doc.masterSpreads[i]);
    list_of_masters_names.push("undefined");
    doc.paragraphStyles.everyItem().name;
    for(var i = 0; i < doc.paragraphStyles.length; i++) {
               list_of_paragraph_styles.push(doc.paragraphStyles[i].name);
               all_paragraph_styles.push(doc.paragraphStyles[i]);
    for(var i = 0; i < doc.paragraphStyleGroups.length; i++) {
              for(b = 0; b < doc.paragraphStyleGroups[i].paragraphStyles.length; b++) {
                        list_of_paragraph_styles.push(doc.paragraphStyleGroups[i].name+"->"+doc.paragraphStyleGroups[i].paragraphStyles[b].name);
                        all_paragraph_styles.push(doc.paragraphStyleGroups[i].paragraphStyles[b]);
    // Make the dialog box for selecting the paragraph styles
    var the_dialog = app.dialogs.add({name:"Section start at paragraph style:"});
    with(the_dialog.dialogColumns.add()){
              with(dialogRows.add()){
                        staticTexts.add({staticLabel:"Find:"});
              with(borderPanels.add()){
                        var find_first_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
    with(dialogRows.add()){
                        staticTexts.add({staticLabel:"Apply Master:"});
              with(borderPanels.add()){
                        var change_master = dropdowns.add({stringList:list_of_masters_names, selectedIndex:0});
                        staticTexts.add({staticLabel:"Select \"undefined\" not to change"});
    the_dialog.show();
    // Define paragraph styles
    var myParagraph = all_paragraph_styles[find_first_paragraph.selectedIndex];
    var myMaster=(list_of_masters_names[change_master.selectedIndex]!="undefined")?list_of_masters[change_master.selectedIndex]:null;
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = myParagraph;
    var myFound=doc.findGrep();
    var i=myFound.length;
    var pBar = new ProgressBar("Sectioning");
         pBar.reset("Rabdare...", i);
    while (i--)
            pBar.hit();
            if (myFound[i].parentTextFrames[0].parent.constructor.name=="Character"){
                var myPage=myFound[i].parentTextFrames[0].parent.parentTextFrames[0].parentPage;}
            else{
         var myPage=myFound[i].parentTextFrames[0].parentPage;}
         var mySection;
         if (myPage.appliedSection.pageStart==myPage){mySection=myPage.appliedSection;}
         else{
         doc.sections.add(myPage,{pageNumberStart:1})};
        // mySection.pageStart=myPage;
         //mySection.pageNumberStart=1;
         if (myMaster) {myPage.appliedMaster=myMaster};
    alert("Acum e gata!!");
    app.doScript('main()',undefined,undefined,UndoModes.entireScript,'AutoSections');
    //main();

  • What to do if my master page is too small for custom master page column, I need to change the papers

    What to do if my master page is too small for custom master page column, I need to change the papersize from A4 to US letter size *

    My 2nd gen works fine with WPA2 and AES encryption.
    You may need to go back and start over.  Reset the router back to factory defaults, log on as the admin, set up security, DHCP, and make sure the IP address pool has enough IP addresses to lease to ALL of the computers/devices that will connect to that the router.

  • Is it possible to setup a BB mailbox for one user and a different user's calendar on the same BB?

    Is it possible to setup a BB mailbox for one user and a different user's calendar on the same BB?

    No, not if your connected to a BES server.

  • IMovie less than an hour. share to iDVD failed. read to share to media browser. worked for one movie. tried on different one and iDVD hung up and had to use force quit to get out of it. tried several times -- same result. suggestions?

    iMovie less than an hour in length. share to iDVD failed. read in support to share to media browser. then made DVD through iDVD. worked for one movie. tried on different one and iDVD hung up and had to use force quit to get out of it. tried several times -- same result. suggestions?

    Why start a new and very similar thread to your other one which you have not responded to (have you read the replies?)
    I suggest that no response is made to this duplicate thread. 

  • More contracts (with different suppliers) for one item

    Dear MDM Experts,
    is it possible to make more contracts (with different suppliers) for one item?
    Thanks and regards,
    Ádá

    Hi,
    Thanks for your answer. If I set my shopping cart for a contract with a supplier A, and I select an item with a supplier B, then after pushing button Transport to SRM on the shopping cart webdynpro UI, I would get the an error message, and the item wouldn't come to the SRM.
    If the item doesn't have any supplier, and I make a contract with it, the supplier of the contract goes to the item, and after that I can't make a contract with an other supplier for this item, because of the uppers.
    The type of field Supplier in table Catalog Items is Lookup field, and it can't be modified.
    Could you please write to me which can I set our system to be able to make contracts with many suppliers?
    Thanks and regards,
    Ádám Horváth

  • Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc

    Hi,
    Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc.
    Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?
    12.1.4 / 11g db
    Appreciate your inputs.
    Thanks,
    K

    Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc. It should work.
    Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, What is the issue you have with R12?
    an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?What was Oracle feedback? Did they say it is certified and can be used?
    Thanks,
    Hussein

  • Why my calendar display different there is one day difference from different  when I see main screen and open the calendar

    See my Why my calendar display different there is one day difference from different  when I see main screen and open the calendar

    I too am having the same issue only I am in Regina, Canada.  iCloud appears to think Regina, Canada is in the Central time zone which it is, but it does not use Daylight Savings time.  My PC is Windows 7 and I am using Outlook 2010.  I have iCloud on iPhone 5 and iPad 2.   Terribly frustrating!

  • One Master Page made for multiple files

    Can Master Pages be made, to be used in multiple files? If possible, how?

    sort of. You can use Move Pages to copy whole master pages between documents, or you can connect the files using the Book function, and then sync Master pages for all documents in the book.

  • New SpryWidget .CSS for a New Page

    I have the whole spry arsenal of files on a website in a separate folder. I am already using several widgets and functions from that and among others also a "spry collapsible panel" widget on one of the pages.
    Now, I would like to use it once again on a new page (on the same site), but when I insert the widget it gives me the same SpryCollapsiblePanel.css as the one already used for the previous widget. But I want to give the panel a different look and feel as it has some other purpose on the new page.
    What is the correct procedure to get a fresh untampered "SpryCollapsiblePanel.css" for the new widget on a new page?
    Thank you!

    I notice (finally got the page!) that the lowest element in the 'drop up' menu overlays the main menu title...a byproduct of needing perhaps one more item's height in margin-top negative pixels!
    I suppose it is a small consolation, but IE 8 seems to be rendering the menus accurately, with the sub-submenus flying out relative to their own submenus.
    The only workaround that comes to mind (for all the other browsers out there) is to set up new classes to apply to subsubmenus:
    ul.MenuBarHorizontal ul    /*this is the usual markup; you can leave this in */
        margin-top:-177px;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        width: 160px;
        position: absolute;
        left: -1000em;
    /*add the following, to offset the top margin by multiples of the height of a single item */
    ul.MenuBarHorizontal ul ul.three  {margin-top: 90px;}
    ul.MenuBarHorizontal ul ul.two {margin-top: 60px;}
    ul.MenuBarHorizontal ul ul.one {margin-top: 30px;}
    For instance, the Ladakh Treks subitems want to offset from the top 30px to align with their parent, Ladakh Treks, so I use the <ul class="one"> to drop that sublist 30px down from the top of the container.
    <li><a tabindex="-1" href="http://www.artcraftemporium.com/preview_wildvent/treks.html" target="_blank" class="MenuBarItemSubmenu">Ladakh Treks</a>
          <ul class="one">
                 <li><a tabindex="-1" href="http://www.artcraftemporium.com/preview_wildvent/stok_kangri_exp.html" target="_blank">Stok Kangri Expedition</a></li>
                 <li><a tabindex="-1" href="http://www.artcraftemporium.com/preview_wildvent/markha1.html" target="_blank">Markha Valley</a></li>
            </ul>
    </li>
    This solution does not work in IE8, which had already worked the way you intended without monkeying around with the top margin. I don't know how it works in IE7.
    I have not used conditional markup (I know there are people out there who have, and you could research it!), but one could attempt to put a conditional markup around those class definitions in the stylesheet that would not call on them when your site encounters IE8.
    Beth

  • Is it a best practice to have a template with one master page?

    I am a newbie FM 11 writer and am cleaning up some unorganized books. Should I copy one set of Master Pages to all files in the book. Currently my TOC and certain other files have unique master pages. I would like to set up our books using best practices and would like input from the community. Thanks.

    There are two schools of thought on this. The specific sub-template approach or the "kitchen sink" approach.
    In the "kitchen sink" (i.e. everything, including the...) approach, the FM template is loaded with everything required for the project in a single file. It's simple to deploy, import it to all files and you're good to go. However, the author may have to deal with all sorts of superfluous tags and page layouts in some specific file types, like the cover pages, TOC, Index and other generated files. The onus is on the author to select the correct items to use from the multitude of choices.
    The sub-template approach is modular approach where one creates the various components in separate template files, e.g. paragraph and character tags, tables, page layouts, etc. and combines to create specific templates for the various book components. These component-combined templates only have the minimum that is required for each type of document component. This is a lego-like approach and it provides more flexibility (IMHO) with modifying, updating and creating new templates. This is easier (perhaps less intimidating would be a better term) for the author to use as their choices are much more limited in any given context. However, they do have to apply the correct templates to the specific book components.
    In all cases, you need to document the usage of all components in the template(s), so authors will know the intent of each and every tag, table, sttyle, page layout, etc.

  • How do I create an underlying master page for my master pages (without messing them up)?

    I created a Muse site long ago, and wanted to fix my SEO easily overall by better analytics among other things.
    Perhaps I am doing this the wrong way but I was thinking I could create a master page that I could just drop the html I needed into, and thus not fuss too much with my other pages. The problem is I already have master pages that my site is based on (before you could do this), and it would be much easier to have those master pages stem from one source (a Master master page?).
    Everytime I try to do this it changes my current master and final pages. Anyway I can create and invisible master so this doesn't happen?
    What should I do instead?
    THANK YOU.
    William

    Thanks,
    Your intructions were my plan untill I realized that in doing so, it changed the backgrounds etc of my current masterpages. I realize that this is a lack of planning due to my very rusty design principles, and something I wouldn't have done in my day job if the features had been in place. (so thank you for the new features!) 
    While I realize I could probably fix this by recreating the site with a uniform underlying Primary Master Page feeding into my Secondary Master Pages, I was trying to create a master page that in effect wouldn't change a thing in the other subservient masterpages (thus allowing me freedom to create groups of pages with common analytics or any other types of code).
    Simply when I take your suggestion, things change... can I do this without making things change?
    Not sure if this makes sense. I am trying to avoid coding or a overhaul b/c of time constraints.
    William

  • CS5: Watch out for a master page bug

    I found a pretty serious bug in CS5. I opened a catalog I created with CS4, which has master pages for page frames. I also have occasional left or right title pages which have no frames, and [none] selected as master.
    Elements aligned to spread center on right or left page will sometimes appear on the spread even if the page has [none] as master, but the facing page has a master applied.
    This is difficult to explain, but it seems that the new page system has messed up something and CS5 thinks the element is overlapping both master pages, even tho it's only aligned to center. If I nudge the element by 0,01 mm away from center, it will disappear from the facing page.
    Check your layouts before sending to print.

    How exactly would that work?
    I export from CS4 and open the exported to CS5?
    or
    I open the CS4 document in CS5, export and re-load exported to again CS5?

  • Different layouts with single master page

    hi all,
    I have a created an adobe form which has 2 different layout.
    The First page has some contents which need not be printed on the second page.
    the table is printed in between this two static content which does not to be printed on the next page.
    can anyone suggest how do i go about in this, Since I am new to adobe forms.
    thanks,
    Rohit

    Hello together,
    I solved this by myself:
    - All stripes were put in a wrapping subform STRIPECODE on the masterpage-area (outside content area)
    - the lines to be switched on/of have their own wrapping subforms each
    - the event STRIPECODE: layout:ready was scripted, since we need page-info here
      there are as much instances of STRIPECODE as we will have odd pages, we get the Number of the page one
      instance of STRIPECODE is on via xfa.layout.page(this);  this is the scriptes STRIPECODE-Instance
    - the subform-children of STRIPECODE , i.e. STRIPECODE.CODE1 ...STRIPECODE.CODE14 are set to visible/unvisible:
      STRIPECODE.CODE1.presence = "invisible"; NOTE: You cannot set the lines directly, only the wrapping subforms. Thats why we need them
    If this is helpfull for anyone, please try to answer my 2 outstanding questions
    Regards C

Maybe you are looking for

  • Hot Keys to switch tabs intermittently stop working (Apple-Option-[)

    I've been used to using Apple/Command + Shift + [ to go to next and previous tabs for ages. I used to use Apple + Shift + Arrow keys, but when Safari made the brackets the new default, I figured I'd update. I seem to keep having an issue multiple tim

  • Re: Filing a complaint

    Branched from: Filing a complaint I am having a similar issue.  I have gone into a store, dialed *611 and even posted on their FaceBook page.  Here's my story..... Warning!! Verizon Wireless will contact you and offer you a rate reduction and then te

  • How to start, hot to get .prm or .dll or working plugin file from a VS 2008 generated .exp .lib .pdb

    Hi, I download the SDK, load some sample project (e.g. SDK Exporter) in visual studio 2008 from a Windows 7 64bit workstation. No conversion ask. Build > Build Solution creates several files but none with the .dll or .prm extension. Resulting files a

  • Video card not quite dead yet?

    Had something interesting happen to my late 2009 27" i5 iMac. I've worked on Macs for years and never saw a case quite like this, but it's my machine this time, so maybe I need an outside perspective. This weekend I watched an HD stream for 3 hours a

  • Querying GPO Details

    I need some help on querying GPO. I want to know how many total GPOs applied for each OU. GPO with out no parameters and no link GPO's With less than 2 parameters and less than 2 links Can any please help on this how to query these details in GPO. We