intro text into table content category listing

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
torryarmy
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Oct 05, 2005 2:12 pm
Location: costa blanca, spain

intro text into table content category listing

Post by torryarmy » Fri Oct 14, 2005 8:46 pm

instead of title, etc

i'd like to have the title then the intro text - i got this in content.html.php:

">
title; ?>



the next td would be "something" like

introtext; ?>

but i get an undefined property

how do i define the variable earlier in content.html.php?

(the idea is to have the intro text as a mini table with the address & telephone that is already preformatted in the intro text of each content item)

like this  (ignore colour scheme etc - way off being finished!)
You do not have the required permissions to view the files attached to this post.
Last edited by torryarmy on Mon Nov 07, 2005 3:59 pm, edited 1 time in total.
there is only one truth, and that is that life under capitalism is s**t, and only drugs, load music & f**king make it bearable.

torryarmy
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Oct 05, 2005 2:12 pm
Location: costa blanca, spain

Re: intro text into table content category listing

Post by torryarmy » Mon Oct 17, 2005 8:48 am

anyone ?
there is only one truth, and that is that life under capitalism is s**t, and only drugs, load music & f**king make it bearable.

torryarmy
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Oct 05, 2005 2:12 pm
Location: costa blanca, spain

Re: intro text into table content category listing

Post by torryarmy » Wed Nov 02, 2005 11:40 am

i'm really desperate to get an answer for this :)
there is only one truth, and that is that life under capitalism is s**t, and only drugs, load music & f**king make it bearable.

User avatar
Steve
Joomla! Ace
Joomla! Ace
Posts: 1570
Joined: Tue Aug 23, 2005 1:02 pm
Location: Toowoomba
Contact:

Re: intro text into table content category listing

Post by Steve » Mon Nov 07, 2005 12:04 pm

Hi torryarmy

I want to do the same thing .
Did you have any luck working it out before I start hacking away.

Regards Steve
Regards Steve, Developer of Export Content Component:
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com

torryarmy
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Oct 05, 2005 2:12 pm
Location: costa blanca, spain

Re: intro text into table content category listing

Post by torryarmy » Mon Nov 07, 2005 1:32 pm

nope - ive left new topics on 3 (incl this) forums so far
there is only one truth, and that is that life under capitalism is s**t, and only drugs, load music & f**king make it bearable.

torryarmy
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Oct 05, 2005 2:12 pm
Location: costa blanca, spain

Re: intro text into table content category listing

Post by torryarmy » Mon Nov 07, 2005 3:59 pm

:) :) :) :) :) :)

someone on the joomlahacks forum sorted it

basically in content.php look on line 429 - ie where it lists the items to get get and add in "a.introtext" in amongst the others ie:

// get the list of items for this category
$query = "SELECT a.id, a.introtext, a.title, a.hits, a.created_by, a.created_by_alias, a.created AS created, a.access, u.name AS author, a.state, g.name AS groups"
. "\n FROM #__content AS a"

then what i did was around line 251 do this:


if ( $params->get( 'title' ) ) {
if( $row->access id .'&Itemid='. $Itemid );
?>

">
title; ?>


introtext; ?>

there is only one truth, and that is that life under capitalism is s**t, and only drugs, load music & f**king make it bearable.

User avatar
Steve
Joomla! Ace
Joomla! Ace
Posts: 1570
Joined: Tue Aug 23, 2005 1:02 pm
Location: Toowoomba
Contact:

Re: intro text into table content category listing

Post by Steve » Wed Nov 09, 2005 4:35 am

Thanks torryarmy

Does the {mosimage}  still work in the intros. I did it a different way so I can limit the amount of characters displayed to 150 so where it ends it's like this...redmore but the only problem is the {mosimage} wont work in the intros.

Regards Steve
Regards Steve, Developer of Export Content Component:
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com

torryarmy
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Oct 05, 2005 2:12 pm
Location: costa blanca, spain

Re: intro text into table content category listing

Post by torryarmy » Wed Nov 09, 2005 10:59 am

havent got a clue ;)

i'd just hard code the image in if it was me

if it became an issue i'd put a post up ;)

my next thing is now how i can put my own fields and therefore variables in the administration side ...
there is only one truth, and that is that life under capitalism is s**t, and only drugs, load music & f**king make it bearable.

User avatar
Steve
Joomla! Ace
Joomla! Ace
Posts: 1570
Joined: Tue Aug 23, 2005 1:02 pm
Location: Toowoomba
Contact:

Re: intro text into table content category listing

Post by Steve » Wed Nov 09, 2005 12:38 pm

You need to edit /administrator/components/com_content/content.xml

This is a very simple example that I have used in modules and as far as I know it's the same for components . Say if you  want to add a text field to the admin you would put this in the xml in between the like this:

Code: Select all

  <param name="page_head'" type="text" default="Page Heading" label="Your page heading" description="Set the page heading"></param>
then in the file you want to have the variable set you would put this

Code: Select all

$page_head= $params->get( 'page_head', Page Heading );
then where ever you use the $page_head variable the admin form field entry will show .And it's much the same deal for yes no selects you call them them in a simlar way but set them up different in the xml. You will get the idea when you look in the xml.

Hope that helps  :D
Regards Steve
Regards Steve, Developer of Export Content Component:
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com

User avatar
Waseem Sadiq
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Mon Sep 12, 2005 7:41 pm
Location: Glasgow - Scotland
Contact:

Re: intro text into table content category listing

Post by Waseem Sadiq » Thu Jan 26, 2006 4:12 pm

Hi folks,

See my post here: http://forum.joomla.org/index.php/topic,33428.0.html for an update on this thread to include dynamic resizing of intro images and text (CSS only)

:)
http://www.bulletprooftemplates.com/ - Joomla Templates and Consultancy


Locked

Return to “General Questions - 1.0.x”