ActionsDev
8 replies to this thread. Most Recent
Dan J
3 Apr 2009, 9:20 pm
[Pro] [REQ] List ID's Action
I have a request for an action, if possible, to apply an ID to the UL tag in a list. It appears that the CSS Menu action does this already and figured it would be possible through the magic of Actions.
What I would use this for is to ID about 5 lists on a page and then I could style them all at the same time while styling another series of lists at another time. Avoiding the use of styling just a general <ul> tag.
If there already is a way to do so in Freeway, I’d like to know.
Thanks.
Website: http://www.danjasker.com
(Resume, Portfolio, Freeway Tutorials & Screencasts Store)
Freeway 5 Pro • Freeway 5 Express
max
7 Apr 2009, 5:39 amHi dan
why don’t you just create a style.. for example: with a name of test, apply hollow bullets and cyan coloured text to this new style. Then just highlight the list text and apply the style via the inspector palette.
This adds the class test to the list. This way it won’t effect other text around this list and/or any other list in the run of text.
You could create 3 different list styles and apply different style to dozens of list all on the same page. Plus you could change the look just by adjusting the styles.
max
it’s better to be lucky than clever.. :o)
Dan J
7 Apr 2009, 6:16 pmI guess that would work. It’s not necessarily the cleanest way, but if that’s how the program handles it.
Thanks Max.
Website: http://www.danjasker.com
(Resume, Portfolio, Freeway Tutorials & Screencasts Store)
Freeway 5 Pro • Freeway 5 Express
max
8 Apr 2009, 12:19 pmHi Dan I looked at how styles were applied to lists and I cant see how else to add the class to them, if you did try to add an id rather than just a class then you wouldn’t be able to make changes to one style and for that change to effect different lists on the same page. Did you have some other way in which you wanted to control the lists? all the best max
it’s better to be lucky than clever.. :o)
Dan J
8 Apr 2009, 4:19 pmWell I wanted to use the “List Element Styler” action which would handle applying the class styles to individual list items and I was hoping to get an ID option for my <ul> tag.
I thought if I could share the same class name in specific instances (for instance if I could have both of the first list items have a class name of “first”) but be under different IDs.
Sounds complicated, but here’s a code version I suppose.
<ul id="list">
<li class="first">Something Here</li>
</ul>
<ul id="sublist">
<li class="first">Something Else</li>
</ul>
Website: http://www.danjasker.com
(Resume, Portfolio, Freeway Tutorials & Screencasts Store)
Freeway 5 Pro • Freeway 5 Express
waltd
8 Apr 2009, 4:33 pmYou can do the same thing with classes as with IDs:
ul.class1 li.first { some style here }
ul.class2 li.first { some other style here }
Or you can use the cascade to do this:
li.first { some fragment of style here }
ul.class1 { some style here }
ul.class2 { some other style here }
As long as you don’t set a particular attribute in the li that overrides what you’ve set in the ul (I’m thinking color is a good example here) you can modify that attribute later. Here’s a practical example:
html
<ul class="class1">
<li class="first">foo</li>
<li>bar</li>
<li>baz</li>
</ul>
<ul class="class2">
<li class="first">foo</li>
<li>bar</li>
<li>baz</li>
</ul>
css
ul.class1 {
color: red;
}
ul.class2 {
color: blue;
font-weight: bold;
}
li.first {
color: green;
font-weight: bold;
}
Now both lists have the same color for the first element, but different colors throughout the rest. The first list has normal type weight except for the first element, the second has bold type throughout.
I am sure you can think up some more elaborate examples.
Walter
On Apr 8, 2009, at 12:19 PM, Dan J wrote:
I thought if I could share the same class name in specific instances (for instance if I could have both of the first list items have a class name of “first”) but be under different IDs.
Freeway user since 1997
Dan J
9 Apr 2009, 2:58 amI am sure you can think up some more elaborate examples.
I probably could, but I’ve spent enough time with it. :)
I took care of it manually using Espresso.
Thanks.
Website: http://www.danjasker.com
(Resume, Portfolio, Freeway Tutorials & Screencasts Store)
Freeway 5 Pro • Freeway 5 Express
waltd
9 Apr 2009, 12:37 pmYes, but that’s a one-way ticket out of Freeway. Your changes will be overwritten the next time you change your design in Freeway. Depending on your workflow, that might be a problem. I point it out for others, since I know you tend to use Freeway as a scratch pad rather than a project management solution.
Walter
On Apr 8, 2009, at 10:58 PM, Dan J wrote:
I am sure you can think up some more elaborate examples.
I probably could, but I’ve spent enough time with it. :)
I took care of it manually using Espresso.
Thanks.
Freeway user since 1997
Dan J
9 Apr 2009, 10:21 pmIt was for an ExpressionEngine based project and I ended up just doing it as an embed template. I was trying to “do-it-all” in Freeway and it turned out to be easier another way. That list item isn’t going to be updated too often and I was able to rig the entry to work better.
I was hoping that an action could be used, but hey…you gotta use what you got with what it can do.
Website: http://www.danjasker.com
(Resume, Portfolio, Freeway Tutorials & Screencasts Store)
Freeway 5 Pro • Freeway 5 Express
