News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Display Jdownloads file title Inline in Text

Started by cwarder, 26.05.2016 22:27:33

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cwarder

Hi. I am using Jdownloads 3.2.41. I am using the content plugin. The jdownload files are displayed correctly in the content. My customer wants to be able to add a jdownload file in a paragraph so that it is display: inline. I changed the jd_content class to display:inline. I also created a new file layout with just the file title. When I look at the content, a <p></p> is put above and below the file. I looked at the layout and nothing is there except {file_title}. How can I get rid of the <p></p> before and after the div class jd_content?
  •  

ColinM

Hi
You first need to update to jD v44.  There are a new set of layouts, one of which is "Files link only v3.2".  However this will need some extra css in jd_custom.css
/*  section for Content Plugin - title only  */
.jd_content_plugin{
float:none;
display:inline-block;
clear:none;
}


This css will be part of the next release.    Note the class .jd_content_plugin has been introduced for aid in customising the plugin appearance.

Colin
Colin M
  •  

alfeltrin

After you have added a div wrapp i have problems to display a link inline inside a paragraph

This is my code:
<p>
File A: {jd_file file==1}

File B: {jd_file file==2}
</p>

And this is the html generated:
<p>File A:</p>
<div jDownload....></div>

A solution may be to have the possibility to choose to enable/disable the wrapper
  •  

ColinM

Hi
This is an Editor mode problem.  Basically HTML does not 'allow' or support a <div> inside a <p> (actually it is 'undefined' as to what happens). The Editor 'corrects' your code!

So set your editor to its <div> mode Editors such as JCE, JCK are usually defaulted to Paragraph mode.

So your code should look like below NB the
 has also been removed.
<div>
File A: {jd_file file==1}
File B: {jd_file file==2}
</div>

and it must not be inside a <p> element.

Attached are 3 pics which show the result when using editor in <div> mode

There are numerous web references to having <div> inside <p> with explanations why it is not 'allowed'. <p> is a block element Basically the specification  http://www.w3.org/TR/html401/struct/text.html#h-9.3.1,  says that the P element "cannot contain block-level elements (including P itself)".

The <div> element is also a block element but its main purpose is for grouping other block elements.

Think I need to add to the documentation.  And Yes I have made the same mistake!!

Colin

[gelöscht durch Administrator]
Colin M
  •