Get tag attributes in Tag.aspx script?

Last post 12-07-2010, 10:48 AM by Tobster. 2 replies.
Sort Posts: Previous Next
  •  12-07-2010, 6:35 AM 65311

    Get tag attributes in Tag.aspx script?

    Is it possible to get the element attributes from the scripts in Tag.aspx?
     
    Ideally in the script that enumerates the elements of tag.config so I can add additional logic to conditionally load tabs based on the attributes of an image being edited.
  •  12-07-2010, 10:43 AM 65314 in reply to 65311

    Re: Get tag attributes in Tag.aspx script?

    Dear tobster,
     
    Please open "tag.aspx", you can find the following method, it enumerates the elements of tag.config,
     
         foreach(XmlElement xe in doc.DocumentElement.SelectNodes("add"))
         {
          string tab=xe.GetAttribute("tab");
          
          if(IsTagPattern(tagName,xe.GetAttribute("pattern")))
          {
           bool isactive=(index==0&&(tabName==null||tabName==""))||(string.Compare(tab,tabName,true)==0);
           if(isactive)
           {
            tabcontrol=xe.GetAttribute("control");
            tabtext=xe.GetAttribute("text");
           }
          %>
    ................
     
    Thank you for asking
     
  •  12-07-2010, 10:48 AM 65315 in reply to 65314

    Re: Get tag attributes in Tag.aspx script?

    That's what I've done already. I'm trying to access the tag attributes from that code.
     
    For example, <IMG src="yay.png" mycustomattrib="Bob">
     
    if(mycustomattrib == "Bob")
        loadBobsTabs_ButNotTheImgOnes();
View as RSS news feed in XML