As you see, there is no URL, but just a name and a value. This works with any text or image, but the button and other stacks of foundry can not work with this link type. Can you please check this, as I need it for a customer to work?
Perhaps I need to adjust the URL, but it works per description with any image/text link I set up so far.
This is, I expect, the Stacks issue where data attributes are striped out of the Stacks link function used in buttons.
I was hoping this would have been corrected in Stacks but it is still the current behaviour. The Foundation button is the same but Andrew at BWD has added this to his ButtonPlus2. You can use ButtonPlus2 in Foundry if you ignore the Foundation warning and setup using custom settings because obviously the Foundation values are not available.
I would be in strong favour of Data Attributes being added to the Foundry button as a new feature, because this is such a useful thing to be able to trigger various things. Adding it as an advanced feature shouldn’t overcomplicate the Button settings yet would really extend it’s use I think.
It isn’t actually a bug with Stacks or the Foundry Button stack. Let’s delve into the inner workings. Hold on to your socks –
When used on a regular RW page, like a Styled Text page for instance, each link created using the link sheet, the little drop down window you get when adding a link, gets every attribute you add stuck into the link tag. This isn’t the case for Stacks. Stacks separates them out to individual variables. This has its ups and downs.
The stack chooses attributes which to use, adding them to the code one-by-one through specialized variables provided by Stacks. The problem is there are some like class or title or rel or id that are standards and can be accounted for in all cases, we can plan ahead for these, but data attributes are not standard. That data-photo-group is a variable that is being used by Nick’s stack and is a part of that particular stack only, but it isn’t something we the developers of other stacks can just guess at, as that isn’t a standard attribute. I would have to know that exact attribute by name and hard code it into the stack using one of those specialized variables I mentioned above.
There’s no way to know and account for every data attribute since they’re not standardized names like the others (class, id, etc.). There’s also no way to have it load every data attribute since each one is uniquely different and each one has to be loaded into the link tag individually.
That is a completely custom control and not related to the link sheet though at all. Again, non-standard. I’m not against it mind you, just trying to explain that it is not a bug with either Stacks or the Foundry button(s).
Hi - I would love to reopen this issue. I have seen that all other button stack actually support this syntax / feature. I am currently using Button Press 2 from Doobox. He also supports the Bootstrap look&feel, but ads a slight border around the button I can not recreate on the foundry buttons. His buttons are also slightly larger.
@Fuellemann – Data attributes like you’re using are non-standard and cannot be added through a stack using the drop down link sheet. Attributes have to be pre-determined for the Stacks API so the stack can know which attributes it is looking for… so standard attributes like rel, class, id, target, etc are examples of these pre-programmed attributes, but since the data attributes are non-standard, they are not pre-programmed into the stack because they can be anything and everything.
I could want to a data attribute called data-elephant. Since no one out there could predict that there would be a user wanting to make us of a data-elephant attribute they can’t plan ahead for that in the stack.
The stacks you’re referring to are not ones I am familiar with, but I can say this – I suspect they have you enter the data attribute into the stack’s settings and don’t set it up in the link drop down sheet as link attributes are generally configured in RapidWeaver. This approach leaves open the ability to enter any text, symbols, etc you want into that data attribute field. Even content that would be invalid and / or cause problems. That is not a can of worms I wish to open up at this time.
@Fuellemann There is some good information about adding Data Attributes at the super slick looking site at PopDrop stack for RapidWeaver. In summary, normally you can add data attributes with the RW link but as Andrew at BWD notes - " The Foundation button stack does not support data-attributes. " Sounds like the Foundry button and others don’t either.
There is an immediate solution by using BWD ButtonPlus2 which has Data Attributes built into the button settings and of course works with Foundry. Also you can add custom borders.
I like to use, on occasion, the peek-a-boo stack from Joe Workman in conjunction with a link. That works 100% of the time but there can be an instance when I need it to work when I click a button. That’s when I get into the same problem as you are discussing here. I’ve found the easiest way is to enclose the button in the free LinkBox stack from Stacks4Stacks.
The hard way is when the button is part of another stack, an example would be Icon Connect from 1ld, then depending on the button I add this code to the javascript tab of the HTML Code:
I’m using the fourth button of the icon connect stack with a custom icon to open a siphon form. You have to be able to use Inspect Element to find your particular class for whichever button you are trying to use which would be a problem if you intend to use a button in the Foundry Button Group as that stack uses a common class for all the buttons. Though you could fake that design element with columns and individual buttons using the easy method with LinkBox. Please keep in mind, as I mentioned earlier on this forum, I know just enough css and javascript to be dangerous.