Gallery Options

Page: 1

Author Post
Member
Registered: Nov 2012
Posts: 1
I was wondering if there is an option that will allow grouping of certain child element and not others. I am working with <td> elements that contain anchors. Some anchors have img tags inside of them, while others have text as the anchor.

Is it possible to group only anchors that contain an img tag or would that require an outside workaround?

Here is an example:

<admin>
pasted code removed
</admin

I would like only the <a> tags in the first TR to show up in the gallery. I know it can be done via the fbClassOption, but I am designing the system so that the graphic designers that are building the tables and inserting the images can proceed as normal and not have to remember to add another class.

If fbClassOption is the best way I am more than happy to use it and instruct the designers on the new class, just searching for other options first.

Thanks in advance for you help.
« Last edit by admin on Tue Nov 06, 2012 7:02 am. »
Administrator
Registered: Aug 2008
Posts: 3382
It's probably best if I just outline the approaches that are available to you and leave it to you to pick the best approach for your project.

First, there is no configuration that says "activate links that have img elements in them but don't activate links that have only text in them". If that is desired, it is probably best implemented in server-side code that generates the page markup.

The floatbox class can be assigned directly to individual links, thus marking precisely which ones you want to open with Floatbox. The floatbox class can also be placed on a containing element and it will effectively be inherited by <a> and <area> elements within that containing element. Those child elements will be activated for floatbox behaviour just as if each one had the floatbox class directly assigned to them.

The containing element does not need to be a div. It can be any element that can have child elements. Thus, for example, if you have a table and want floatbox activation for links in a certain row, but not in others, you can place the floatbox class on that <tr> element.

Options assigned to a containing element that has the floatbox class assigned will be propagated to the activated child elements. Options assigned directly to contained elements will override inherited options. The options can be assigned through a data-fb-options attribute, a rev attribute, or assigned per class name from fbClassOptions on the page or classOptions defined in the options.js file.

You can exclude a particular link from activation by assigning a class or rel attribute of "nofloatbox" to it. If you had, let's say, a <p> element containing 10 links, 9 of which should be activated for Floatbox, you could put the floatbox class on the <p> element and a nofloatbox class on the single child <a> element that is to be excluded. The "nofloatbox" class or rel is not propagated from a containing element and must be place on individual <a> or <area> elements directly.

Finally, you mentioned marking links for Floatbox activation using fbClassOptions. This can't be done. fbClassOptions assigns option preferences to activated items that have a corresponding class name. Marking for activation with the floatbox class is a different process than assigning option preferences to those activated links.

Page: 1