Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #36608

    If in the <style> area a formatting with

    td {
    text-align: left;

    appears, the page number is no longer formatted on the right.

    You must be logged in to view attached files.

    Wenn im <style> Bereich eine Formatierung mit

    <%@ taglib uri=”/WEB-INF/tlds/pd4tl.tld” prefix=”pd4tl”%><pd4tl:transform
    pageNumberTemplate=”Seite $[page] / $[total]”
    <title>Gefüllte Auberginenröllchen mit Tomaten-Paprika Ragout</title>
    <style type=”text/css”>
    td {
    text-align: left;
    <body style=”background-color: lightgray;”>
    Hello, World!

    You must be logged in to view attached files.

    The pageNumberTemplate and pageNumberAlignment attributes in the code

    <pd4tl:header titleTemplate=”$[title]” titleAlignment=”left” pageNumberTemplate=”Seite $[page] / $[total]” pageNumberAlignment=”right” />

    are supported for backward compatibility with text-only headers/footers of PD4ML v3. They are converted into HTML table with the simple code:

    style += "font-size: " + fontSize + "px; "; tpl = "<table width=100% border=0 style=\"" + style + "\">\n<tr>\n<td width=33% style=\"" + style + "\">" + left + "</td><td align=center width=33% style=\"" + style + "\">" + center + "</td><td width=34% align=right style=\"" + style + "\">" + right + "</td>\n</tr>\n</table>";

    and obviously affected by TD style

    The best approach would be to use your header markup, not relying on v3 legacy and the auto-generated three column table

    <pd4ml:page.header> ... HTML ... ”$[title]” ... HTML ... Seite $[page] / $[total] ... </pd4ml:page.header>

    But if you need to provide a compatibility to older HTML/JSP templates, you can add the explicit style: pd4ml-page-header TD {text-align: right;}

    And of course, we’ll try to resolve the issue with an ignoring of pageNumberAlignment=”right”


    Thank you very much for the useful information!
    Through your presentation of the internals I was able to solve another problem, that I had when I switched from V3 to V4: particularly long titles in the headline were wrapped. So I modified one of your variants for a short-term solution:

    pd4ml-page-header TD:nth-child(1) {
    white-space: nowrap;
    pd4ml-page-header TD:nth-child(3) {
    width: 10%;
    white-space: nowrap;
    text-align: right;

    In the long term, I will gradually change the templates to <pd4ml:page.header>.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.