Forum


Replies: 9   Views: 1827
Embedhtml, list styles and item depth
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Simon87  · 21-01-2020 - 11:04

Hi,

We need 3 levels of numbering and have our document genereted via embedHTML. We apply custom style via class name added to html tags. What attribute will tell generator which numbering level to use? We tried "depth" and "data-depth", didn't help.

Main code sample: https://www.dropbox.com/s/km7fg7h1c1mhae9/slack_2020-01-21_14-04-38.png?dl=0

Posted by admin  · 21-01-2020 - 12:30

Hello,

UPDATE: HTML Extended and CSS Extended available in Premium licenses support using data-depth to set a custom list level to li tags.

Regards.

Posted by Simon87  · 21-01-2020 - 12:49

Which custom style can we use? 

Posted by admin  · 21-01-2020 - 13:04

Hello,

You can create and use a custom list style (https://www.phpdocx.com/api-documentation/layout-and-general/create-Word-custom-list-style-with-PHP) with the options that suit your needs and apply it to a paragraph or a custom paragraph from HTML or using addText.

Instead of applying the third level of a custom level list, that phpdocx doesn't allow to apply as first element of the content based on the depth, you could generate a custom list style that the first level has the required properties and then apply it to the paragraph or HTML or custom paragraph style.

Regards.

Posted by Simon87  · 21-01-2020 - 14:19

Yep, we do this way. But when after document is generated when someone changes number on first level of our lists changes do not touch second level of sublist. When will you patch phpdocx with this feature and will this patch be available for me on current licence?

Posted by admin  · 21-01-2020 - 14:41

Hello,

We have moved the request to the dev team and it has been added to the task list to be done, but it doesn't have a release date yet. First if needed to be checked by the dev team.

Please note that new features are only added to new versions, so phpdocx 9.5 won't include that feature but another future release. New versions can be downloaded if the license includes LUS [https://www.phpdocx.com/updates] (LUS licenses can also get beta patches and beta changes) or after doing an upgrade when a new version has been launched. Your license doesn't have LUS included, we recommend you to get it on MY PHPDOCX page after login.

Regards.

Posted by Simon87  · 21-01-2020 - 15:05

That's a bad situation. We saw that there is a depth-feature for lists in your engine, consulted with you, but we don't get it in html mode thus having not full functionality. And you tell me to pay once more although we found this glitch. Are you sure that's a reasonable client-oriented decision? :)

Posted by admin  · 21-01-2020 - 15:12

Hello,

UPDATE: HTML Extended and CSS Extended available in Premium licenses support using data-depth to set a custom list level to li tags.

Applying a custom depth of a custom list style to a paragraph has never been supported. This is not an error but a feature not available yet. It will be available in a future release of the library.

Regards.

Posted by admin  · 21-01-2020 - 15:20

Hello,

The page you link is from XMLAPI and the XML content:

<pdx:data pdx:type="list">
    <pdx:item pdx:depth="1">item 1</pdx:item>
    <pdx:item pdx:depth="2">subitem 1.1</pdx:item>
    <pdx:item pdx:depth="2">subitem 1.2</pdx:item>
    <pdx:item pdx:depth="2">subitem 1.3</pdx:item>
    <pdx:item pdx:depth="1">item 2</pdx:item>
</pdx:data>

allows generating a list from XML using XMLAPI (https://www.phpdocx.com/xmlapi-documentation/word-content/insert-list-nested-Word-document-with-PHP), not to set a custom depth style from a custom list style to a paragraph. pdx:depth sets the level of the list content, not a custom style.

Regards.