HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
only want to show content within a 'h' tag from article
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
richard_traffic



Joined: 22 Jul 2009
Posts: 2

PostPosted: Wed Jul 22, 2009 8:06 am     only want to show content within a 'h' tag from article Reply with quote

Im using a module in joomla 1.5.12 to show some content, its a latest news module, it shows a thumbnail of the first image, the article title and a number of characters of the article (number depending on what you specify)

the module is styled within its parameters using an html editor, it creates a div and inserts the content as you require, heres the styling at present

Code:
<div style="height:25px;margin:0 0 10px 0">

<img src="{introimage}"style="float:left; width:25px;height:25px;margin-left: 0px; margin-right: 10px; margin-top: -1px;">

<a style="a:hover color:#FFFFFF;" href="{link}"><span style="font:normal 11px sans-serif; color:#FFFF00; padding:1px;">{title}</span></a><span style="color:#000000;font:9px;">{introtext}</span>

</div>


in this case im using it to show latest record releases, i want the record title and record label to show, the record title is the article title but the record label is within the article body within h4 tags.

so the question is.... can i within that code tell the module to only display content from the article that is within h4 tags? (or any other tags for that matter) and not to show the rest of the article...

any help would be appreciated
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

PostPosted: Wed Jul 22, 2009 9:02 am     Reply with quote

Really didn't follow that explanation completely, but if there is anything within a tag you need to hide, you can always style it with:

visibility: hidden;

I hope that is what you are needing.
richard_traffic



Joined: 22 Jul 2009
Posts: 2

PostPosted: Wed Jul 22, 2009 9:37 am     Reply with quote

Sorry, let me try and explain a little more clearly.

I have a media website that has many articles uploaded daily. Here is a typical article in html format;


Code:
<p><img src="image.jpg" border="0" /></p>
<h4>(Metroline Ltd)</h4>
<p>Here we have a wicked four track EP from Frenchman, Max Fader, on relatively new label, Metroline. There may have been a resurgence of house music over the past few months but there is still some strong minimal techno to be found and this is one of them. All four tracks are solid and interesting like his previous release on Multivitamins and the variety is there too. Hunt this down!</p>



i am using a latest news module for joomla to show the most recently added articles on the front page, in this case i want the article title and the record label '(Metroline Ltd)' to show within this module. The only paramater you can change in the module is the number of characters of the article it will show. In the above example id want it to show 15 characters however if i set the global parameter to show 15 characters and the next articles record label is less than 15 it will show the first few characters of the body copy, similarly if the next record label is more than 15 characters it wont show the full name.

So i need a way of calling the content to be shown within the module from the articles but specifying that only content within the h4 tag is shown, is this possible?

i hope thats made it a bit clearer...
PayneLess Designs



Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS

PostPosted: Tue Jul 28, 2009 5:10 pm     Reply with quote

OK. You got me there as I don't know that much about the module. The "Display News by BK" module states, "User defined format is the best feature of this module." so I'm taking a stab at it and say yes. Been wrong before, Razz. Otherwise, it depends on the module used: Joomla Latest News module
sticks464



Joined: 31 Dec 2006
Posts: 2308

PostPosted: Wed Jul 29, 2009 4:15 am     Reply with quote

As long as you can edit the module, you can leave out what you like. To leave just the image and h4 edit it as such, leaving off the span for {introtext}
Code:
<a style="a:hover color:#FFFFFF;" href="{link}"><span style="font:normal 11px sans-serif; color:#FFFF00; padding:1px;">{title}</span></a>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial