Welcome to TalkGraphics.com
Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Bug Need better access to HTML Attributes

    I understand how the first typed value in the Names is used for the value of the HTML id attribute: e.g., Apply Name [galleryId] > Add ==> id="galleryId".
    Subsequent additions appear lower in the Names list and are effectively ignored.

    Equally, including the phrase filename="..." allows the HTML scr attribute to be amended, e.g. Apply Name [filename="GalleryImage"] > Add ==> src="Gallery%20Image".
    Again, subsequent additions appear lower in the Names list and are effectively ignored.

    The HTML alt attribute is set with the web Properties > Image > Image caption (Alt Text): [Alt Text for the Gallery Image] ==> alt="Alt Text for the Gallery Image".

    Provided the image is not used as a trigger for a Mouse-over layer, then setting Web Properties > Mouse-over > Show popup text (Title) sets the HTML title attribute: [Gallery Title Text] ==> title="Gallery Title Text".

    I wish to use jQuery and my own code to further manipulate my images after they have been published; fade in/out being the simplest to visualise...
    Provided I have applied Names to each image I could search for them separately with jQuery("#galleryId") for each and every unique id. This will lead to slow coding.
    My solution seems to be constrained to prefixing all the images I want to manipulate with ids with a prefixed class as in Apply Name [ClassX:galleryId] > Add ==>id="ClassX:58galleryID" so I can properly add the ClassX using jQuery with jQuery(img [id^="ClassX"].addClass("ClassX").

    I apologise for such detail but I wish to ask if anyone has a better approach?
    Have I overlooked a current Xara kludge, as in the Names and filename="..." method, as I would love to see class="...", title="..." and style="..." included in future versions as any HTML element can have a class, title and style as well as an id.

  2. #2
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: Need better access to HTML Attributes

    I could search for them separately with jQuery("#galleryId") for each and every unique id. This will lead to slow coding.

    Not really, because if you know the IDs, you can assign a class to that id and then manipulate them via the class.

    something like

    $("#my_image").addClass('fademe');
    $("#my_image2").addClass('fademe');
    $("#my_image3").addClass('fademe');

    It may be tedious, but no more tedious than doing the same thing inside Xara. Then you can manipulate them via the class.
    I'm not sure that's going to really help you though, because seeing ten images (say) fading in together at the same time, for example, is not going to be a good look.

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Default Re: Need better access to HTML Attributes

    I concur with fading 10 images together would be naff but I was trying to set the scene.
    I might be looking at a homespun carousel of all the images with that class.
    The other idea I was thing over was an accordion show/hide for headings and a fancier pop-up display on hover over images.
    If a class assignment could be realised then I could apply that Name to multiple selections on a few clicks within Xara.

  4. #4

    Default Re: Need better access to HTML Attributes

    With respect, sounds like Xara Web Designer is the wrong application for you.

  5. #5
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Default Re: Need better access to HTML Attributes

    Quote Originally Posted by sledger View Post
    With respect, sounds like Xara Web Designer is the wrong application for you.
    sledger, I don't see my interest here any different to those who want to include HTML in placeholders, use the tweaksets or experiment with the Highslide parameters (listed as Stickies in the Forum) or use the supplied Widgets. I would like to use jQuery sometimes rather than rely on undocumented features or HTML 5 Widgets than may come and go.
    With a class applied to a group of objects below a vertical position, it would be possible to move them all down the page on the fly to allow for a dynamic replacement in a CMS.

    All I was trying to establish was that I hadn't missed some feature that would make such things cleaner and clearer.
    Acorn.

  6. #6
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: Need better access to HTML Attributes

    I think the difficultly is that you are essentially hacking the pages and while it can work and other people do mini-hacks via placeholders and the like, it's not really a natural use of Xara. Anyone who is manipulating pages like this might ask if life would be even easier not using Xara.

    It's really an identification of a bit of a dilemma for Xara, people wanting to extend Xara functionality, but that in itself goes against what I've also thought to be the basic premise of Xara - design without needing to care about the underlying code.

  7. #7
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Need better access to HTML Attributes

    Hi Acorn.

    You have not missed anything. There's no way to specify custom classes or styles in current version. However, if you need this feature so much, I'll add the support of custom classes in the next version. I think this would be sufficient.
    John.

  8. #8
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Smile Re: Need better access to HTML Attributes

    Quote Originally Posted by covoxer View Post
    ... I'll add the support of custom classes in the next version. I think this would be sufficient.
    That will be very useful, covxer. As jQuery is already in use in XWD, it will make make for better HTML integration.
    Cheers, Acorn

  9. #9

    Default Re: Need better access to HTML Attributes

    How's that for developer support! Never let it be said that Xara doesn't listen

  10. #10
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Default Re: Need better access to HTML Attributes

    sledger, I am pleasantly stunned.
    It has encouraged me to assist on this board more to pay off this debt!
    Acorn

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •