Read More element
The Read More element can be used to create customizable links to dynamically-generated web pages. This element is similar in function to the Menu element. But instead of generating a list of multiple page links, it only generates just one link.
Much like a Menu element, the Read More element uses a method of query
strings (like ?DOC_INST=22
) to display a 'virtual copy'
of the target page and populate it with the correct content.
A good usage example would be to combine it with a Loop element, to create a list of blog article titles and summaries. By inserting a Read More element below the summery text, you can now create a link to the full blog post.
The Read More element code
<?php webyep_readMore("read", "Read More", "readmorepage.php", "_self", 550, 240); // WebYepV2 ?>
Arguments for the function call
- "Fieldname": A string - the fieldname for this element.
- "Link Text": A string - a default text for the link.
- "target_page.php": A string - the URL to the target (template) page. For example, a blog post or product information page.
-
"Target": A string - like
_self
or_blank
, to control whether the link should open in a new browser tab or not. - "Modal Size": Maximum width and height of the editor modal window.
Screenshots
Attributes of the Loop element
Fieldname
A distinctive name for that element. This name will be used to distinguish the Loop from other WebYep elements in a page.
Link text
The default text for the Read More edit button. If left blank, WebYep will display the element's name instead next to the edit button.
Page (URL)
The URL (or filename) of a page to be shown when a visitor clicks the link.
If the Read More element is positioned inside a Loop element (see the WebYep Loop element), the Read More elements behave much like a WebYep Menu element. The page shown when clicking the link can have different content shown, depending on which link (in which loop item) the visitor clicked on.
So one could for example create a loop (using a WebYep Loop element) of brief product descriptions with a product title (Short Text element), a description (Long Text element) and a Read More element in the looped block. By assigning the URL of a detail page to the Read More element, visitors can click on the link to see the detail page for that product.
Target frame
If the page which URL you entered in the "Target Page" attribute should be opened in another HTML frame you can enter this frame's name here.
Modal window size
As the developer you can preset the dimensions of the modal window size.