Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do i modify my template to make it longer when necessary?

Posted on 2008-06-24
9
Medium Priority
?
162 Views
Last Modified: 2012-05-05
Hello,

At present i'm intending to use the attached code snippet to form a template for adding blog entries on my site.

However, because some blog entries will be much longer than others i would like to know how this code can be modified so that i can add another image and several lines of text e.g.

<img style="float:left" src="someimage.jpg" />
<p>Some more text</p>
<p>Some more text</p>
<p>Some more text</p>

So perhaps initially the template would start with just the above (1 pic & several lines of text) and then i could click a button to 'add more'...

Hope you understand me & many thanks for your help
<div> 
<img style="float:left" src="someimage.jpg" /> 
<p>Some text</p>
<p>Some more text</p>
<p>Some more text</p>
<img style="float:right" src="someimage.jpg" /> 
<p>Some more text</p>
<p>Some more text</p>
<p>Some more text</p>
<img style="float:left" src="someimage.jpg" /> 
<p>Some more text</p>
<p>Some more text</p>
<p>Some more text</p>
</div>

Open in new window

0
Comment
Question by:Daniish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 21860413
That code should stretch to fit the content.  There is nothing there that restricts height in any way.
0
 

Author Comment

by:Daniish
ID: 21861385
No, but as it stands the template would only allow 3 images to be added - what if my blog is long enough to encompass 5 images and supporting text - surely the template would be restrictive?
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 1500 total points
ID: 21861398
The problem with your question is that you are not telling us enough about how your template works.  All the above is is HTML in a div.  From looking at the above, if you need more images, just copy/paste the relevant code and change the src property to get another image.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Daniish
ID: 21861441
Fair point well made, i guess i'm asking how i can build a dynamic template that can be of any length - following the structure laid out above... depending on how much i have to write about a particular place.

There's probably an easy solution for this that i have yet considered :p
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 21861472
How will the template be called?  What scripting environment will you be supporting?
0
 

Author Comment

by:Daniish
ID: 21861564
My form uses the WYSISWYG FCKeditor:
http://www.fckeditor.net/

.. with which it is possible to create and use templates:
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Templates

.. supporting these integrations (presumably scripting environments) pref. php or javascript:
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide


 
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 21861606
Okay, now we're getting somewhere.  

When you use the Template button on the toolbar, does it overwrite the existing contents?
0
 

Author Comment

by:Daniish
ID: 21863557
Yes. When you select a template it overwrites the existing contents, even if this is another template.
0
 

Author Closing Comment

by:Daniish
ID: 31470065
I need to learn to start off with something simple and gradually increase the complexity. I'm not going to use a template for the time being just hardcode what i need, marking up the images that i need.

Thanks for your help
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question