Versions

CSS_-_ID_Class_MULTI.fwaction.zip (2017-03-31) (Downloaded 33 times)

Contains:

  • CSS: ID - Class FW-7 (item-action) - v. 2.2
  • CSS: ID - Class FW-6 (item-action) - v. 1.5.1

Compatible: Pro 6 and Pro 7

WY_CSS_-_ID_Class.zip (2017-03-28) (Downloaded 15 times)

Contains:

  • CSS: ID - Class (item-action) - v. 2

Compatible: Pro 7

CSS_-_ID_Class.fwaction.zip (2013-07-14) (Downloaded 65 times)

Contains:

Compatible: Pro 6

Author: max fancourt

developer cms template javascript commercial server prototype content management

Version:2

The latest 2 version now works correctly with Freeway 7.
It converts ID-based styles into Class styles and or removes ID’s it can also add extra styles or a combination of all three. It also works with master styles sheet based items.
(Please note: version 2 is a freeway 7 only action)

In the end, we scrapped what we did a few days ago and used parts of the old method to allow us to insert CRITICAL CSS styles into the head before any other styles.

ok so what we have now is

  1. Items on Master pages now work correctly, and you have complete control over how you wish those styles to be associated with the HTML element or if you prefer no association (anonymous).
  2. If you wish, just Class styles can be chosen and no ID’s.
  3. If convert to ‘Class styles’ option is not chosen and the Delete ID is checked, you can still apply extra classes from the text panel within the action palette.
  4. If you apply a style from the inspector this will also be included.
  5. If you add a class via extended then this will be incorporated within the HTML.
  6. Critical CSS styles can be inserted into the head before all other styles.
  7. The Action works with media queries so is fully responsive savvy.
  8. If you choose ‘No External Style Sheets’ in Document setup then the action will now function correctly (it failed before).

I have also combined the older but updated Class to ID Action because it may be useful and of course works properly with freeway version 6.
I have named these latest actions differently from previous. They now have FW-6 or FW-7 designation at the end of the names. This is because people may have too many documents with the old action applied so rather than remove that old action and run the risk of things failing, I have decided to rename the new actions. You should be able to install this combined version without destroying the old.

OLD PreVersion 2

This is a straightforward action to create a class based style from most objects that have an ID Style and then remove if chosen the ID name.

12 Comments

Hi Max!

It doesn't seem to work on images - could you check please?

I'm using FW Pro 6.1.0

Cheers, Ian.

Hi Ian I just checked it with an image and it worked perfectly if you want to send me your example directly I shall have a look

Hi Max! Sorry, I've only just seen your reply. I'll check again. In the mean time, I have another problem where background images, having their css moved from the css folder to the document, are still referencing '../Resources', which causes 404 errors. Could you have a look please? Cheers, Ian.

Hi ian yes thats a bug on my part in the meantime turn off external styles sheets then use Tims Externalize action which will move all the styles into an external style sheet then it will work

speak soon max

HI Max!

I'm still having problems with images. I've emailed you a sample file to your v.net address.

Cheers, Ian.

Hi Max!

After a longer period of doing HTML stuff primarily manually in Sublime, I now have some usage again for FWP. Found your action, which is quite useful for dynamic page layouts. There is one minor thing I would change: The item styles converted to class styles are still in the head section of the page but they aren't used any more. Creates a lot of unnecessary clutter especially, if you have a lot if inline divs with their ID removed.
I'd be happy to add this to your action but can't as it is encrypted. Would it be possible to either send me the action in unencrypted form or, in case you want to keep the code private, to modify this behavior yourself? I cannot think of any reason, the unused item styles could be beneficial, so I would simply delete them always, but you could make this optional with an additional checkbox in the UI.

Cheers, Peter.

Hi Peter what's your email address.

This action fails when (background)images are applied to DIV's via the inspector. It shows the path starting from a subfolder like -for example- the css folder.

Hi Richard thanks for that I shall have a look unfortunately this isn't a perfect action and in reality this sort of functionality should really be done within freeway rather than in an action but i the mean time I will have a look and see what going wrong on background images all the best max

Comment awaiting moderation.

Comment awaiting moderation.

With regards to the comments I made above about workarounds for background images, I can confirm that the FW7 version of the action works perfectly with no workaround required.

Sign In or Sign Up to comment.