post image float right or left chosen by Joomla article parameter

jnskst
20 Posts
jnskst posted this 03 August 2015

Hi, I want to have my postimage flexible float left or right, chosen by Joomla article parameter.
I can do it fixed in themler but how it's possible like in original templates?

regards

Jens

Hi, I want to have my postimage flexible float left or right, chosen by Joomla article parameter. I can do it fixed in themler but how it's possible like in original templates? regards Jens
Vote to pay developers attention to this features or issue.
16 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 15 November 2016

Hello Danny,
the
http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_nth-child_odd_even
provides good CSS example.
If you need help with incorporating it exactly into your theme please provide link to your blog page

regards,
Aileen

Hello Danny, the http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_nth-child_odd_even provides good CSS example. If you need help with incorporating it exactly into your theme please provide link to your blog page regards, Aileen
d.vangelder
27 Posts
d.vangelder posted this 11 November 2016

Hello support team,

You mentioned that this can be done by using nth-child.
Do you have a manual how to do so in themler?

kind Regards,

Danny

Hello support team, You mentioned that this can be done by using nth-child. Do you have a manual how to do so in themler? kind Regards, Danny
Bayern
127 Posts
Bayern posted this 09 November 2016

there is no div

You add a picture using the JCE, place it on the left, center or right

1.png

there is no div You add a picture using the JCE, place it on the left, center or right !1.png!
d.vangelder
27 Posts
d.vangelder posted this 09 November 2016

Hi Scorpion Computers & Software,

I implemented your solution but without any effect.
In the article_4, article_5, article_6, and article_7 files I could not find the div class.

Hope you can point me to a sollution.

Danny

Hi Scorpion Computers & Software, I implemented your solution but without any effect. In the article_4, article_5, article_6, and article_7 files I could not find the div class. Hope you can point me to a sollution. Danny
Bayern
127 Posts
Bayern posted this 06 November 2016

For me this is superfluous

i use the JCE Editor and i can place an image where ever i want

For me this is superfluous i use the JCE Editor and i can place an image where ever i want
Scorpion Computers & Software
126 Posts
Scorpion Computers & Software posted this 04 November 2016

I have created a solution myself and i want to share this with you
I have also asked Themler to implement it in the next version

In the file html/com_content/article/deafult_template.php
After every line that has the code

<?php ob_start(); ?>

Place the following piece of codeafter that (6 times in my current template)

<?php
// Added by Scorpion Computers & Software
// Adds class for pulling the article image left or right
$myparams  = $this->item->params;
$images  = json_decode($this->item->images);
$imgfloat = (empty($images->float_fulltext)) ? $myparams->get('float_fulltext') : $images->float_fulltext;
$imgfloafclass = 'pull-' . $imgfloat;
$params['image-float'] = $imgfloafclass;
// End of added by Scorpion Computers & Software
?>

The go to the files include/article_2.php to include/article_7.php and look for a line that has the class="bd-postimage in it. In the class parameter add the following code

 <?php echo $data['image-float'];?>

As an example the line should look something like this

<div class=" bd-postimage-4 bd-no-margins <?php echo $data['image-float'];?>">

I have created a solution myself and i want to share this with you I have also asked Themler to implement it in the next version In the file html/com_content/article/deafult_template.php After every line that has the code <?php ob_start(); ?> Place the following piece of codeafter that (6 times in my current template) <?php // Added by Scorpion Computers & Software // Adds class for pulling the article image left or right $myparams = $this->item->params; $images = json_decode($this->item->images); $imgfloat = (empty($images->float_fulltext)) ? $myparams->get('float_fulltext') : $images->float_fulltext; $imgfloafclass = 'pull-' . $imgfloat; $params['image-float'] = $imgfloafclass; // End of added by Scorpion Computers & Software ?> The go to the files include/article_2.php to include/article_7.php and look for a line that has the **class="bd-postimage** in it. In the class parameter add the following code <?php echo $data['image-float'];?> As an example the line should look something like this <div class=" bd-postimage-4 bd-no-margins <?php echo $data['image-float'];?>">
Scorpion Computers & Software
126 Posts
Scorpion Computers & Software posted this 01 November 2016

I'm very sorry but i don't think that is acceptable. It is not that difficult for your developers to implement adding a class form a Joomla attribute. Custom CSS still needs to know what the websites manager has chosen for the image. I am talking about a simgle article view.

I'm very sorry but i don't think that is acceptable. It is not that difficult for your developers to implement adding a class form a Joomla attribute. Custom CSS still needs to know what the websites manager has chosen for the image. I am talking about a simgle article view.
Support Team
Support Team posted this 18 October 2016

Hello Edwin,
the issues related to Joomla articles options was discussed year ago and it was decided not to inherit these settings in Themler theme.
So the solution is to use custom CSS as recommended before.

regards,
Aileen

Hello Edwin, the issues related to Joomla articles options was discussed year ago and it was decided not to inherit these settings in Themler theme. So the solution is to use custom CSS as recommended before. regards, Aileen
Scorpion Computers & Software
126 Posts
Scorpion Computers & Software posted this 15 October 2016

Oke, it has been more than a year since the last response. Still this feature is not fixed in Themler. I also want to use this functionality and i am sure i'm not the only one.

Joomla normaly just adds a bootstrap class like "pull-right" in the surrounding DIV

Can you please add this functionality?

Here's a piece of code from the original component for content

<?php $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext; ?>
<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <img
<?php if ($images->image_fulltext_caption):
    echo 'class="caption"' . ' title="' . htmlspecialchars($images->image_fulltext_caption) . '"';
endif; ?>

Oke, it has been more than a year since the last response. Still this feature is not fixed in Themler. I also want to use this functionality and i am sure i'm not the only one. Joomla normaly just adds a bootstrap class like "pull-right" in the surrounding DIV Can you please add this functionality? Here's a piece of code from the original component for content <?php $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext; ?> <div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <img <?php if ($images->image_fulltext_caption): echo 'class="caption"' . ' title="' . htmlspecialchars($images->image_fulltext_caption) . '"'; endif; ?>
Support Team
Support Team posted this 09 September 2015

Hello Jens,
I'm very sorry for delay in response.
The settings from the Article Options >> Images from the Joomla admin back end are not used by Themler. It's behavior by design.
Please try using the :nth-child() selector to detect the odd and even row and specify different float:
http://www.w3schools.com/cssref/sel_nth-child.asp

regards,
Aileen

Hello Jens, I'm very sorry for delay in response. The settings from the Article Options >> Images from the Joomla admin back end are not used by Themler. It's behavior by design. Please try using the `:nth-child()` selector to detect the odd and even row and specify different float: http://www.w3schools.com/cssref/sel_nth-child.asp regards, Aileen
jnskst
20 Posts
jnskst posted this 04 August 2015

Its controlled by joomla option for each article within the article option. please see the attachment.
I need to place the image left, right, left, right and so on.

Its controlled by joomla option for each article within the article option. please see the attachment. I need to place the image left, right, left, right and so on.
Stagger Lee
1818 Posts
Stagger Lee posted this 03 August 2015

I dont work in Joomla. It is a blog list and all images have same named classes and divs.

How do you align those images ? Inside Joomla Readmore part in editor ?

I dont work in Joomla. It is a blog list and all images have same named classes and divs. How do you align those images ? Inside Joomla Readmore part in editor ?
jnskst
20 Posts
jnskst posted this 03 August 2015

Sorry, but it do not work. here is the link. the first article has picture float left by joomla and the second float right by joomla

http://hifi-profis.j-koester.de/index.php?option=com_content&view=category&layout=blog&id=10&Itemid=162

Sorry, but it do not work. here is the link. the first article has picture float left by joomla and the second float right by joomla http://hifi-profis.j-koester.de/index.php?option=com_content&view=category&layout=blog&id=10&Itemid=162
Stagger Lee
1818 Posts
Stagger Lee posted this 03 August 2015

It is empty by default. But if it is activated set options to none.

It is empty by default. But if it is activated set options to none.
jnskst
20 Posts
jnskst posted this 03 August 2015

and remove the float?

and remove the float?
Stagger Lee
1818 Posts
Stagger Lee posted this 03 August 2015

Go to Image "More options" and chose display:block or inline-block for images in Articles.

Go to Image "More options" and chose display:block or inline-block for images in Articles.
You must log in or register to leave comments