ActionsDev

5 replies to this thread. Most Recent

Dan J

12 Aug 2008, 2:29 am

[REQ] DIV Tag Wrapper For Use In A CMS

I have a request if someone could do it:

I’d like to have an action that could place code before and after outside of a DIV, but I could set what I want before, by a text-box, and then set the after as well, via a text box. Both would need to be different.

Two action’s exist which are similar already and those are the “Comment” action and the “CrowBar” action. If someone would graciously somehow modify those to what I’d need them to do, it’d save me a ton of time wrapping an Expression Engine weblog entries tag around specific DIV tags instead of manually editing them after-wards.

If there is an easier way to do this besides manually adding the tags later via TextMate I’d appreciate that as well. (Other than Joe’s Actions)

Thanks in advance.

quote

My Blog: http://danjasker.blogspot.com • Freeway 5 Pro • Freeway 5 Express

waltd

12 Aug 2008, 11:34 am

Can you post an example here of exactly what you would want that to look like? Do you just want a pair of text boxes and whatever you type in them would be bookended at either side of the DIV?

Walter

quote

Freeway user since 1997

http://www.walterdavisstudio.com

Dan J

12 Aug 2008, 4:22 pm

Here’s what I have setup using an Expression Engine weblog entries tag:

{exp:weblog:entries weblog="sample" limit="1"}
<div id="sample">
<p>{title} by {article_author}{summary}<p>
<div>
{/exp:weblog:entries}

I’d need the action to “bookend” the DIV so I could add the {exp…} tag before it and the {/exp…} tag after it.

quote

My Blog: http://danjasker.blogspot.com • Freeway 5 Pro • Freeway 5 Express

Todd

12 Aug 2008, 4:41 pm

Have you tried inserting markup items before and after the div? It’s an easy way to get the code in there but not very elegant I suppose.

Todd

On Aug 12, 2008, at 11:21 AM, Dan J wrote:

Here’s what I have setup using an Expression Engine weblog entries tag:

{exp:weblog:entries weblog=”sample” limit=”1”} <div id=”sample”> <p>{title} by {article_author}{summary}<p> <div> {/exp:weblog:entries}

I’d need the action to “bookend” the DIV so I could add the {exp…} tag before it and the {/exp…} tag after it.

quote

waltd

12 Aug 2008, 4:47 pm

Okay, that’s about what I expected you needed. Have a look in my bag of tricks:

http://freewaypro.com/actions/downloads

I made TagWrap this morning to do precisely what you need here. I also added parameters to remove the ID and dimensions and positioning, should you want to use the result inside of a loop. Most of this is cribbed from my TemplateHelper Action, which is another way to go about doing this.

Walter

quote

Freeway user since 1997

http://www.walterdavisstudio.com

Back to Top

Dan J

12 Aug 2008, 5:26 pm

Thanks waltd, it does what exactly what I need it to do. This will save lots of time.

quote

My Blog: http://danjasker.blogspot.com • Freeway 5 Pro • Freeway 5 Express

FreeCounter