Another <p> question with stylesheets

This forum is for all Flare issues related to getting started and installing the application.
Post Reply
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Another <p> question with stylesheets

Post by ccardimon »

I imported a project. That went well enough. I split it into topic, built the TOC, and a browse sequence. All went well enough. I started going through it and realized all my P blocks are p.Footer. Shouldn't they be p.BodyText?

I can change them one by one from p.Footer to p.BodyText, but I need to change them in larger numbers, or all at once if possible.

If this is possible, how do I do it?
Craig

Lost in Disturbia
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Another <p> question with stylesheets

Post by LTinker68 »

They should just be <p> tags, although you could change them to the bodyText class, so long as you have that defined in the stylesheet. I'm guessing, though, that you imported the file and didn't map the style to the <p> tag or else you told it to import the Word styles.

The easiest thing to do would be to do a global find-and-replace on <p class="footer"> and replace it with <p class="bodyText"> or just <p>. Unless you actually have a footer class paragraph at the bottom of each topic, in which case, that gets more problematic.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

LTinker68 wrote:...that gets more problematic.
My middle name is Problematic. GRIN.
Craig

Lost in Disturbia
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

LTinker68 wrote:The easiest thing to do would be to do a global find-and-replace on <p class="footer"> and replace it with <p class="bodyText"> or just <p>.
Where would I perform this global S&R?

How does one do one of them thar things?
Craig

Lost in Disturbia
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Another <p> question with stylesheets

Post by KevinDAmery »

Open the Find and Replace window and enter the appropriate text in each field. To make the search global, change the pulldown that says "Current Topic" to "Whole Project." Also, since this is a code change, you'll need to enable the "Find in source code" check box.

And, I would recommend backing the project up before proceeding - if the find / replace parameters result in any code that isn't valid XHTML, you won't be able to open the topic, so having a backup gives you an escape route if things get hairy.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

Thanks for the advice and the warning. I shall take heed of both.
Craig

Lost in Disturbia
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Another <p> question with stylesheets

Post by doc_guy »

You can also do it outside Flare. I often do my global find/replace in TextPad, because I like the interface better. Since your source files are all XML-based, you can use any product that can read text files.
Paul Pehrson
My Blog

Image
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Another <p> question with stylesheets

Post by doc_guy »

Oh, and I'll second that you should have a generic <p> tag without a class. You REALLY Don't want to go down the road of having to apply your body class to every paragraph of body text in your project. You'll get sick of that VERY quickly.
Paul Pehrson
My Blog

Image
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

doc_guy wrote:Oh, and I'll second that you should have a generic <p> tag without a class. You REALLY Don't want to go down the road of having to apply your body class to every paragraph of body text in your project. You'll get sick of that VERY quickly.
Fine by me. I do almost anything you guys recommend. You have been there and done that. I am struggling to do what you have already done.
Craig

Lost in Disturbia
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

When I click on a structure block, and I click on Style Class, I get the popup menu of styles.

A message at the bottom of the menu says, "Only 20 of 69 syles shown."

How can I see the other styles that are hidden? Nothing I click is working.
Craig

Lost in Disturbia
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Another <p> question with stylesheets

Post by LTinker68 »

The popup list is the same content as what you'll see in the Styles pane or the styles drop-down menu. So if you're in a <p> tag, you'll see only paragraph-related styles. If you're in a list, you'll see only list-related styles.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

LTinker68 wrote:The popup list is the same content as what you'll see in the Styles pane or the styles drop-down menu. So if you're in a <p> tag, you'll see only paragraph-related styles. If you're in a list, you'll see only list-related styles.
Right, so why do I not see the classless P style I recently created? All other P styles except the new one seem to be there.
Craig

Lost in Disturbia
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Another <p> question with stylesheets

Post by lacastle »

This might be too drastic, but I think if you delete the p.whatever styles from your stylesheet, the text that was tagged as p.whatever will just default back to p.
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

It does seem a bit drastic. I think I may wait before doing this, and try a few other things. I don't know what, yet. Sigh.
Craig

Lost in Disturbia
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Another <p> question with stylesheets

Post by LTinker68 »

lacastle wrote:This might be too drastic, but I think if you delete the p.whatever styles from your stylesheet, the text that was tagged as p.whatever will just default back to p.
Not exactly. They'll default back to <p> stylistically when you look at them through a browser, but the class name will still appear in the topic code. Deleting it from the stylesheet doesn't delete all instances of it in the project. Although I think others have submitted feature requests asking for that capability.

I don't know what will happen in the print output if you remove a class from a stylesheet but leave the class specified in the topic.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

LTinker68 wrote:
lacastle wrote:This might be too drastic, but I think if you delete the p.whatever styles from your stylesheet, the text that was tagged as p.whatever will just default back to p.
Not exactly. They'll default back to <p> stylistically when you look at them through a browser, but the class name will still appear in the topic code. Deleting it from the stylesheet doesn't delete all instances of it in the project. Although I think others have submitted feature requests asking for that capability.

I don't know what will happen in the print output if you remove a class from a stylesheet but leave the class specified in the topic.
Well, heck. I think I will leave this option in my back pocket for now. Sounds just a bit dicey to put into action. Call me a coward.
Craig

Lost in Disturbia
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Another <p> question with stylesheets

Post by lacastle »

Coward ;)

Make a copy of the project and try it to see what happens.
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Another <p> question with stylesheets

Post by ccardimon »

Of course now that I gritted my teeth and was prepared to go Medieval on my project, the P style is showing up in the Style box. It wasn't there before. I raised the battleaxe and things suddenly decided to cooperated. Amazing.
Craig

Lost in Disturbia
Post Reply