![]() ![]() ![]() |
![]() |
Long Text Element
This element is useful for long text passages like product descriptions or news articles - or even whole pages. The text content of this element can be formatted by the user with some rudimental formatting options (like bold text or bullet lists). The possibilities of formatting the text are limited within the Long Text Element (see below). That is why it is especially useful if you as the web designer want to stay in control of the styling of the text. If you want to give more control over the text's styling to the editors, the Rich Text Element might be more useful. This element is represented by the following PHP code: <?php webyep_longText("Fieldname", false, "", false); ?> more... Arguments for the webyep_longText() PHP function call:
(see "Attributes of the Long Text Element" below for details)
The user can use the following formatting options to format the text entered:
The formatting option <EXAMPLE Some
text in a special style Placing the Text ElementPlease always remember that the Long Text Elements produces HTML code! When the user creates a bullet list for example the Long Text Elements creates <ul> and<li> HTML tags. Thus it is important to place the Long Text Element at a position in your page where such HTML tags are allowed! The safest place is inside a <div> tag. Not ideal would be a paragraph (<p> tag) as HTML does not allow bullet lists inside a paragraph. To determine the HTML tag in which you have placed the Long Text Element simply click the PHP icon representing the Long Text Element and take a look at Dreamweaver's Tag Selector (at the bottom of the document window): The right most listed tag is the tag that encloses your Long Text Element. If you find your Long Text Element placed inside a <p> tag you can change it into a <div> tag by clicking the <p> tag in the Tag Selector with the right mouse button and choose "Edit Tag...". Formatting listsThe Long Text Element creates bullet lists by using the <ul> and <li> HTML tags. Therefore you can format these lists by defining CSS styles for these tags. For example you could create a style: ul { list-style-position: outside; list-style-image: url(bullet.gif); } to define the image "bullet.gif" as the bullet symbol used in all lists. If you want your style to only change the look of lists inside the WebYep Text Element (and not all lists in the page), embed the Text Element in a <div> tag, give that tag a CSS class (class="someclassname") and change the name of the above style from "ul" to ".someclassname ul". To only style list items of a specific indention level, you need to repeat the tag name ("ul") in the CSS style's name (selector): .someclassname ul ul { .....; } for instance would only define the style for second level items and deeper, but not the main items. To style ordered lists created with the "+" sign, use the "ol" tag name instead of "ul" in the style names above. Formatting tablesTo change the look of tables, you simply create the usual CSS styles for the <table> and/or <td> tag - e.g.: table {margin: 0px;} If you want your styles to only change the look of tables inside the WebYep Text Element (and not all tables in the page), embed the Text Element in a <div> tag, give that tag a CSS class (class="someclassname") and change the name of the above styles from "table" to".someclassname table" and from "td" to ".someclassname td". Attributes of the Long Text Element
FieldnameA distinctive name for that element. This name will be displayed in the page in edit mode to give the user a hint on what this elements content stands for and to distinguish the different WebYep Elements in a page. ContentWhen set to "for this doc only" the elements content is unique for this page - even if another element on a different page has the same name. If set to "for all documents" the content will be the same on all pages for elements of this kind that use the same name. Encode EMail LinksIf a user enters an email address into a Long Text Element, WebYep will display it as a clickable link ("mailto" link). If you enable the "Encode EMail Links" option, WebYep will encode these links to keep SPAM spiders from collecting the email addresses. Do do so, WebYep uses a JavaScript based encoding. If the visitors of your website have deactivated JavaScript, they will only see these email addresses in the form: name(_AT_)domain.com and the email addresses will then not be clickable. ![]() |