WP write pro: wk type

Hey,

Since type returns 3 in both cases, how can i discover if my write pro object is a header or a footer ?
Body type is 8

<code 4D>
WP GET ATTRIBUTES($O_TemplateHeader;wk type;$L_TypeHeader)
WP GET ATTRIBUTES($O_TemplateFooter;wk type;$L_TypeFooter)
WP GET ATTRIBUTES($O_TemplateCorps;wk type;$L_TypeCorps)
</code 4D>

You can check for $O_TemplateHeader.container.stylesheet="@Header" (or “@Footer”).

We do it this way using v17R4. There may be a better way using later versions of 4D (or maybe even a better way using 17R4?).

Hello Bertrand and Justin

The answer of Justin works fine. I use it myself.
FYI, i’ve discussed about having distinct types for headers and footers (i’ve been surprised myself by this similar value!) but this would introduce a compatibility break if we modified this now…

Best regards,

Roland

: Roland LANNUZEL

this would introduce a compatibility break if we modified this now…

Write pro is still at its beginning, so sometimes, ensuring the compatibility should be overridden by accuracy in order to avoid tricks and workarounds.

Hello,

“Beginning” ???

4DWP has been introduced with the v14 R5… (2014 !)

Since we had 3 major versions… v15, v16, v17…

and now v18…

;->>

Roland Lannuzel

: Roland LANNUZEL

“Beginning” ???

I meant young :wink: