Changing the pivotx tag html tag output.

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

Changing the pivotx tag html tag output.

Postby kelon » Wed Aug 01, 2012 2:02 pm

Hi. I'm new to Pivotx but consider I've got on quite well with it so far. A question I've not been able to resolve myself though I suspect it is probably straightforward is:

In my user profile, the "text editor" is: Wysiwig.

Using the "edit Image" page, in the "body" area I've added some images using:
Code: Select all
 [[image file="folder/image.jpg" width="541" height="691" alt="Some words here" ]]


When this outputs (as a result of [[ body ]] in the template), it wraps the image in a <div> tag with a class="pivotx-wrapper".

I don't want this. What's the best approach to changing this so it does not wrap the image in a <div>?

Thank you for stopping by, hope you can help. Cheers.
kelon
 
Posts: 6
Joined: Wed Aug 01, 2012 1:44 pm

Re: Changing the pivotx tag html tag output.

Postby Harm10 » Wed Aug 01, 2012 2:15 pm

What don't you want? The class or the div? You can read the template tag behaviour here: http://book.pivotx.net/page/app-b#anchor-image
I think when you use the align option the wrapper is not there (but I am not sure).

You can also use tag popup (http://book.pivotx.net/page/app-b#anchor-popup) together with a thumbnail or extension image tools (http://extensions.pivotx.net/entry/30/imagetools) to manipulate settings for images.

Does this help for your problem?
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1601
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Changing the pivotx tag html tag output.

Postby kelon » Wed Aug 01, 2012 4:59 pm

Hi Harm

Thank you for pitching in. Ideally I don't want the <div> at all.

I've already looked at all the resource you kindly offer and even installed the Image Tools extension.

I'm thinking I just write the html <img> tag directly into the entry editor don't I. Though I presumed it's "just better" to use a [[ image ]] tag.

Thank you for your suggestions.
kelon
 
Posts: 6
Joined: Wed Aug 01, 2012 1:44 pm

Re: Changing the pivotx tag html tag output.

Postby kelon » Wed Aug 01, 2012 9:05 pm

Just a quick note: I've changed the smarty module so I can use the [[ image ]] tag.
kelon
 
Posts: 6
Joined: Wed Aug 01, 2012 1:44 pm

Re: Changing the pivotx tag html tag output.

Postby Harm10 » Wed Aug 01, 2012 10:22 pm

Perhaps you can post your change here. Maybe it gets officially incorporated........
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1601
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Changing the pivotx tag html tag output.

Postby hansfn » Thu Aug 02, 2012 9:19 am

Smarty has a html_image tag - didn't know there was an image tag?
hansfn
Developer
 
Posts: 3072
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Changing the pivotx tag html tag output.

Postby kelon » Fri Aug 03, 2012 10:46 am

Hi. I'm not ignoring this thread or your request to explain. I'm a bit stacked out and don't want to respond with a rushed document. Thanks for your patience.
kelon
 
Posts: 6
Joined: Wed Aug 01, 2012 1:44 pm

Re: Changing the pivotx tag html tag output.

Postby kelon » Sat Aug 04, 2012 8:06 pm

Hello. Now I'm really embarrassed. However, thought I'd come and own up rather than abandon this thread.

More-speed-less-haste, as they say - too much pressure to do other things rather than work on my website. Having undertaken a simple but nasty hack "for now" as part of my prototype local site, I came back to do the job properly before uploading to the web - having decided Pivotx is deffo the CMS to go with (I've tried-out a number of CMS's, including Textpattern, Flatpress, GetSimpleCMS).

I intended to write a snippet extension based on the existing smarty_image() function. Well of course I realised I'd skimmed (in my haste) and missed the param option: 'inline'.
Code: Select all
 [[ image align="inline" etc., ]]

Doh. Oh boy. And it is documented. "inline" outputs the image without a div wrapper which is what I wanted.

The image is still wrapped by a html paragraph tag which irritates me and I'm pondering whether it irritates me enough to pursue a solution.
Code: Select all
 <p><img src="etc... /></p>


Thanks for your patience.
kelon
 
Posts: 6
Joined: Wed Aug 01, 2012 1:44 pm

Re: Changing the pivotx tag html tag output.

Postby hansfn » Sat Aug 04, 2012 8:34 pm

The opening and closing p tag is coming from the editor you use - not the template tag. (Switch to "None (plain XHTML)" as Text editor under "My Info" to get more control.)
hansfn
Developer
 
Posts: 3072
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Changing the pivotx tag html tag output.

Postby kelon » Sat Aug 04, 2012 10:52 pm

Hi Hansfn. Yes I know. Editors always bug me.

I have someone who's going to write for my website as well as me, but who has no idea about html so they need to use a 'friendly' editor.

If different users use different editors then I've got to come up with css rules which will cope with the html variations, haven't I (?)

Thank you for taking the time to give your advice, that's kind.
kelon
 
Posts: 6
Joined: Wed Aug 01, 2012 1:44 pm


Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron