Page 2 of 2

Re: link to a file in a paragraph

Posted: 23 Aug 2011, 08:53
by jegbertzen
adding phocadownload links, causes text to run out of the <P> as shown below in bold:

<p>De kwalificatie ambtenaren zijn aangesteld op basis van een </p>
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=6:functieprofiel-kwalificatieplicht&id=4:kwalificatieplicht&Itemid=433">functieprofiel</a>
</div>
en werken volgens het
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=7:werkplan-kwalificatieplicht&id=4:kwalificatieplicht&Itemid=433">werkplan kwalificatieplicht</a>
</div>
, dat is opgesteld naar aanleiding van de uitkomsten van het onderzoek.
<p></p>

That is what I am trying to say. If you look at the code that I have send from the editor, you will see correct code.

Re: link to a file in a paragraph

Posted: 25 Aug 2011, 18:33
by Jan
Hi, I still don't understand or I see it wrong (HTML), I see nothing wrong with:

<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=6:functieprofiel-kwalificatieplicht&id=4:kwalificatieplicht&Itemid=433">functieprofiel</a>
</div>

Maybe you should not add the whole plugin between the <p></p> but between the <div></div> area ... so maybe then the editor will not stop the p tag

:idea:

Re: link to a file in a paragraph

Posted: 25 Aug 2011, 22:23
by jegbertzen
Last try from my side... did you compare the backend code with the frontend code, that I posted?

I like to have my text properly made up in <p> instead of <div>

Any way my goal is to add a phocadownload link on a word in a paragraph of text, but the first link does something with the paragraph! see for example: http://www.orangeplayground.nl/cjgparks ... Itemid=105

I also have sent you a login, so you can check it yourself.

Re: link to a file in a paragraph

Posted: 25 Aug 2011, 23:08
by Jan
Hi, I have compared it and I understand it, try to see this similar post:

http://www.webmasterworld.com/html/3560080.htm

In some document types (XHTML ???) divs are not allowed in p tags, so it is possible that this is the reason why the p tag is ended and why to use divs to insert the plugin code into the article.

The plugin code is a large block so divs are needed there, but there is no reason why the article should have plugin inside p tags. So the easiest solution (if it will work, no experiences) is to add the code to div tag in the article.

In fact this issue is not related to Phoca Plugin but to the formatting the html in the article. :idea: and there will be problem with all possible plugins which render some block of information on the site, I think. :idea:

Jan

Re: link to a file in a paragraph

Posted: 25 Aug 2011, 23:27
by jegbertzen
Oh tnx for the answer... hmm not sure what to do with it now. I have not experienced it before. Guess I need to force div text containers instead of paragraphs, but I am not sure if that is according to W3C...

great tool by the way, PhocaDownload!

Re: link to a file in a paragraph

Posted: 25 Aug 2011, 23:57
by Jan
but I am not sure if that is according to W3C
Sorry, I don't understand, using p or div is not important issue, it does not influence anything, important on the site is its content, not the tags used for displaying the content.

Jan

Re: link to a file in a paragraph

Posted: 03 Oct 2014, 11:18
by plamen
Old thread ...

I am using PD module and have the following inside article:

Code: Select all

<p>bla-bla: {phocadownload view=file|id=18|text=foo|target=s}.</p>
this is producing output like:

Code: Select all

<p>bla-bla: <div class="phocadownloadfile32"><a href="/component/phocadownload/category/10-obyavi?download=18:obyava" target="_self" >foo</a></div>.</p>
but:Why <p> tag can't contain <div> tag inside it?

My DOCTYPE is HTML5
I am using JCE, may be other editors also place <p> tags automaticly in articles.
So, how to avoid <div> inside <p>?

Re: link to a file in a paragraph

Posted: 04 Oct 2014, 23:19
by Jan
Hi, I think this should be a question on editor's developer, there are two ways how the <p> tag will be added:

- by user
- by editor automatically

If this happen to me, the only way is to see the html source code of the article and change the p tag to div.

But as written, this should be a question on editor's developer, if there is e.g. some option to prevent from adding <p> tags automatically :idea:

Jan

Re: link to a file in a paragraph

Posted: 05 Oct 2014, 08:54
by plamen
Yes, there is a option in JCE a row to be marked as div instead of paragraph.
Image
so to following code should reside on a separate row as div

Code: Select all

<div>{phocadownload view=file|id=18|text=foo|target=s}</div>
Image

Re: link to a file in a paragraph

Posted: 05 Oct 2014, 23:17
by Jan
Hi, thank you very much for the info.

Jan