×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Read more and comments in the same line

Read more and comments in the same line 11 years 6 months ago #20571

  • GrzesiekRadom
  • GrzesiekRadom's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hi

How can I do to have read more link and add comment in the same line? Now read more is one line and add comments is below.

Im from Poland and "read more" is "więcej" and "add comment" is "skomentuj"

My site is www.ojezu.pl

Regards

Grzesiek
Attachments:

Read more and comments in the same line 11 years 6 months ago #20573

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You'll need to create a template override for your layout.

components/articles/views/featured/tmpl/default.php - if you are using the featured view

components/articles/views/category/tmpl/blog_item.php - if you are using the category view

Search for this line:
<?php echo $this->item->event->afterDisplayContent; ?>

and move it after the readmore link.

More info on template overrides over here:
docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core

Regards,
Daniel

Read more and comments in the same line 11 years 6 months ago #20575

  • GrzesiekRadom
  • GrzesiekRadom's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hi

Thanks very much. I`ve tried put in in several places, but only which I can get is to move "add comments" on line up, not the same line.

I`am adding my file - default_item.php. Can You help me and add this line in correct place and send me - This email address is being protected from spambots. You need JavaScript enabled to view it. ?

www.mediafire.com/?xk5k7xph85yhxik

It`ll be great..

Read more and comments in the same line 11 years 6 months ago #20580

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Just move the line in the <p class="readmore" before the closing </p> tag

like this:
	</a><?php echo $this->item->event->afterDisplayContent; ?></p>

I tested it here and it looks fine.
Daniel

Read more and comments in the same line 11 years 6 months ago #20624

  • GrzesiekRadom
  • GrzesiekRadom's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
:( it doesen`t working. Propably I`am doing something wrong.

1. I haven`t got this adresses:
components/articles/views/featured/tmpl/default.php

components/articles/views/category/tmpl/blog_item.php

I`ve got:
templates/jsn_pixel_pro/html/com_content/category
and
templates/jsn_pixel_pro/html/com_content/featured

Those catalogs You mean?

2. In category i have file blog_item.php and there is line </a><?php echo $this->item->event->afterDisplayContent; ?>

In featured i have file featured.php but without those line. It is in default_item.php

Default_item.php You mean in featured?

3. In both this files there is no line <p class="readmore"

(You can check my file in add in last post)

Ive got joomla 2.5..

Have You any idea what can I do?

Regards

Read more and comments in the same line 11 years 6 months ago #20634

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Yes, I have an idea what you can do - start reading :)
docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core

First of all -> go to your menu and find out if the view is "featured" or "category blog". After that you can work on the override.

The fact that you don't have a featured folder in your template just means that the template doesn't provide a template override for this view -> it doesn't mean that you cannot do a template override :)

Check the doc that I gave - it gives you an example how this awesome thing in joomla works. Best part? When you learn how it works you can override the output of 99% of joomla components that follow the joomla conventions...

Cheers,
Daniel

Read more and comments in the same line 11 years 6 months ago #20715

  • GrzesiekRadom
  • GrzesiekRadom's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Thanks for all Your help.

I`ve red all this things but still I can`t do what i need.

My view is featured. And i think that the correct file is to change is default_item.php in templates/jsn_pixel_pro/html/com_content/featured - becouse:
1. there is line "<?php echo $this->item->event->afterDisplayContent; ?>"
2. when I change position of this line something changes with "skomentuj" on main page. I can get it one line up.. but still not in the same line as "więcej" (read more)

I think that is something about code in this file or position line - <?php echo $this->item->event->afterDisplayContent; ?>

But i`ve try many positions, but its not working..

Can You look this file, which I`ve added?

Best regards and thanks again for Your support.
  • Page:
  • 1
Time to create page: 0.125 seconds