# \[Pro\] add 2nd class to a list

**URL:** <https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074>\
**Category:** Freeway\
**Created:** [October 1, 2014, 5:05pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074 "2014-10-01T17:05:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ernie\_Simpson](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@Ernie\_Simpson](https://discourse.softpress.com/u/Ernie_Simpson)\
**Post date:** [October 1, 2014, 5:05pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/1 "2014-10-01T17:05:40Z")

</div>

I am blanking here… does anyone have an idea for adding a second class to a list?

I’m trying to produce the following…

```auto
<ul class="liststyle class2">
       <li>list item</li>
       <li>another list item</li>
       <li>etcetera, and so forth</li>
</ul>

```

All ideas welcome.

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Tim\_Plumb](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/t/58f4c7/32.png) [@Tim\_Plumb](https://discourse.softpress.com/u/Tim_Plumb)\
**Post date:** [October 1, 2014, 7:05pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/2 "2014-10-01T19:05:28Z")

</div>

I don’t think you can do it easily Ernie. You can use an Action, insert the list as a markup item or edit the code after the page has loaded. Unfortunately the application doesn’t provide the same hooks to extend elements like lists, rules etc as it does for tables (for example) where you can inset code at various locations as well as add attributes to the table or cell.  
Regards,  
Tim.

On 1 Oct 2014, at 18:05, The Big Erns wrote:

> I am blanking here… does anyone have an idea for adding a second class to a list?

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![David\_McCallum](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@David\_McCallum](https://discourse.softpress.com/u/David_McCallum)\
**Post date:** [October 1, 2014, 8:21pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/3 "2014-10-01T20:21:54Z")

</div>

I tweaked the AddSelector action to include some more Tags so it may well be tweakable to include UL as well. It allows you to add IDs and Classes.

Would that be useful?

David

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Ernie\_Simpson](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@Ernie\_Simpson](https://discourse.softpress.com/u/Ernie_Simpson)\
**Post date:** [October 1, 2014, 8:31pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/4 "2014-10-01T20:31:45Z")

</div>

I may try that Dave - I’ve used that action before to add selectors to some  
hard-to-reach items. Is it hard to tweak for this?

I tweaked the AddSelector action to include some more Tags so it may well  
be tweakable to include UL as well. It allows you to add IDs and Classes.

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![ThomasKimmich](https://discourse.softpress.com/user_avatar/discourse.softpress.com/thomaskimmich/32/2753_2.png) [@ThomasKimmich](https://discourse.softpress.com/u/ThomasKimmich)\
**Post date:** [October 1, 2014, 8:32pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/5 "2014-10-01T20:32:07Z")

</div>

> On 1 Oct 2014, 7:05 pm, Tim Plumb wrote:
> 
> I don’t think you can do it easily Ernie. You can use an Action, insert the list as a markup item …

all disappointing honestly (to avoid “it sucks”)

Basically I’m pretty sure to know what Ernie is after. So I’m trying to give a go here:

Assumed we have the following construction:

A parent DIV. In this DIV we have couple of things (other DIVs, Graphic items whatsoever).

The two parted action:

#### The Listifier

Applied to the parent it removes the DIV, substituting it by

, removes the ID and by form field you’d add class(es).

#### The List Itemifier

Applied to each child item, it removes the DIV substituting it by

-

---

<div class="post-metadata">

**Author:** ![David\_McCallum](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@David\_McCallum](https://discourse.softpress.com/u/David_McCallum)\
**Post date:** [October 1, 2014, 8:34pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/6 "2014-10-01T20:34:01Z")

</div>

> Is it hard to tweak for this?

Shouldn’t think so - I will have a look later tonight.

D

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Tim\_Plumb](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/t/58f4c7/32.png) [@Tim\_Plumb](https://discourse.softpress.com/u/Tim_Plumb)\
**Post date:** [October 1, 2014, 9:09pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/7 "2014-10-01T21:09:54Z")

</div>

This is a very quick hack but should do what you need;  
[http://www.freewayactions.com/code/?f=Add+classes.fwaction](http://www.freewayactions.com/code/?f=Add+classes.fwaction)

Apply the Action to a parent object and give it the class to hunt for. Once located it will append the other defined class(es) to the object(s).  
I do wish Freeway had nuts and bolts access to items like lists as they remain frustratingly out of reach without Actions like this.  
Regards,  
Tim.

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Ernie\_Simpson](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@Ernie\_Simpson](https://discourse.softpress.com/u/Ernie_Simpson)\
**Post date:** [October 1, 2014, 9:13pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/8 "2014-10-01T21:13:26Z")

</div>

Thanks for the attention guys - adding classes works well with some items,  
but there are still quite a few ordinary bits that the Extended interface  
doesn’t touch. I could make duplicate styles to cover the different style  
combos but that seems so un-clever.

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Ernie\_Simpson](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/e/a587f6/32.png) [@Ernie\_Simpson](https://discourse.softpress.com/u/Ernie_Simpson)\
**Post date:** [October 1, 2014, 9:21pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/9 "2014-10-01T21:21:55Z")

</div>

> This is a very quick hack but should do what you need;  
> [http://www.freewayactions.com/code/?f=Add+classes.fwaction](http://www.freewayactions.com/code/?f=Add+classes.fwaction)

Tim, that does work for me… and is very flexible for other items. Thanks!

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [October 2, 2014, 12:06pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/10 "2014-10-02T12:06:36Z")

</div>

> On 1 Oct 2014, 9:10 pm, Tim Plumb wrote:
> 
> I do wish Freeway had nuts and bolts access to items like lists as they remain frustratingly out of reach without Actions like this.

I usually end up making an inline Action (which goes into one of the LIs), and then reaching upward for the UL in the Action. It becomes unsightly to look at while designing, but does give you the access you need in the Action.

Walter

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Tim\_Plumb](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/t/58f4c7/32.png) [@Tim\_Plumb](https://discourse.softpress.com/u/Tim_Plumb)\
**Post date:** [October 2, 2014, 12:42pm UTC](https://discourse.softpress.com/t/pro-add-2nd-class-to-a-list/21074/11 "2014-10-02T12:42:21Z")

</div>

Hi Walter,  
I agree. Other than pushing the design view around an inline Action would work well here.

I had thought that a generic Action that looked at the styles on the page and attempted to place classes in the HTML would work really well but I stopped when I realised that it would take me far longer than I had. The basic idea is that you could have two styles like this;

```auto
.mycolor { color:#cccccc; }
.mydiv ul { color:#cccccc; }

```

the first one being a Freeway produced style (a name style) and the second a user generated one (a tag style). When the Action runs it would have to look for the second nested style, locate a matching class for the style (mycolor in this example) and then locate the UL on the page to apply the mycolor class to. Finally it would need to clean up the styles once it was done.  
In essence it would dumb down the CSS and simply apply the base styles to the HTML.

Needless to say I found this Action I wrote a lot easier than trying to tackle this! Maybe if I get time I’ll try and look into how this would work.  
Regards,  
Tim.

On 2 Oct 2014, at 13:06, waltd wrote:

> I usually end up making an inline Action (which goes into one of the LIs), and then reaching upward for the UL in the Action. It becomes unsightly to look at while designing, but does give you the access you need in the Action.

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)
