I use the anonymous action (to remove div ID’s) when creating php loops in dynamic sites in Freeway 5 (for example WebYep). Upgrading these old sites to Freeway 6 means the ‘was FW5 inline CSS’ is now pushed externally in FW6 divs of course renders that structure useless without the div name.
OK I could add a class to these looped divs then add CSS into my own extra stylesheet and/pr code the whole loop, what do you do with Freeway 6 in this case? Kinda does not feel right having unused CSS in Freeway 6 page structural CSS.
I don’t think it’s going to be possible to do all of this in an Action – not convert the style to a class-based style AND remove the old ID-based style. But I can imagine an Action that would convert every style attribute of an element into a single class-based style rule, then delete that ID and apply the class. I’ll see if I can knock that together while I enjoy my coffee.
Just sigh and realize that you will have one extra line of CSS in your stylesheet that is “orphaned”.
Walter
On Jun 13, 2013, at 4:39 AM, David Owen wrote:
Hi,
I use the anonymous action (to remove div ID’s) when creating php loops in dynamic sites in Freeway 5 (for example WebYep). Upgrading these old sites to Freeway 6 means the ‘was FW5 inline CSS’ is now pushed externally in FW6 divs of course renders that structure useless without the div name.
OK I could add a class to these looped divs then add CSS into my own extra stylesheet and/pr code the whole loop, what do you do with Freeway 6 in this case? Kinda does not feel right having unused CSS in Freeway 6 page structural CSS.
Note to Action developers – this revs the CSS library to 1.2.4, abstracting the finding of an element’s CSS selector to allow for class-based overrides. This is not properly refactored yet, but it should do as an example of how to make this work. I have not updated my reference Gist with this code branch yet, I am waiting to see how it looks to me tomorrow, and to see what happens with wider testing.
Walter
On Jun 13, 2013, at 8:58 AM, David Owen wrote:
I’m getting a lot of sighs every time I look at upgrading Freeway 5 sites. But that’s probably my fault for pushing Freeway to it’s limit.
I suspect the old FW5 document is carrying over some cruft or baggage from older actions or during the upgrade. I’ll dig through and find where it’s going wrong.
Do you still have the document where it didn’t work? Can you send it to Softpress, along with the copy of the Action that you’re using? I have a feeling this would be a great thing to dissect, because upgrading from 5.x to 6 is very much the done thing these days.
Walter
On Jun 14, 2013, at 7:02 AM, David Owen wrote:
Hi Walt,
Yes that works on a new FW 6 document.
I suspect the old FW5 document is carrying over some cruft or baggage from older actions or during the upgrade. I’ll dig through and find where it’s going wrong.
oddly enough I had the same problems in my projects and created a convert class to id into the webyep actios. I also created a standalone action to do the same for any item including the HTML 5 tags… But my action doesn’t remove the redundant id styles from the style sheet…
did you ever get the action to work correctly in all scenarios?
Hi Walter
I had a few minutes to try the action and I am getting an error on publishing did you get any further with it ?.
I do have the FW6 file which errors if it helps did you want me to send it to you?
I never tried this on a converted document. If you have one that’s “known bad” could you send it my way? I can do some debugging statements in the Action and see if I can find the problem.
Walter
On Jul 5, 2013, at 9:55 AM, max wrote:
Hi Walter
I had a few minutes to try the action and I am getting an error on publishing did you get any further with it ?.
I do have the FW6 file which errors if it helps did you want me to send it to you?