Difference between revisions of "Splitting an Article into an introduction with a link to read more"

From Joomla! Documentation

(Added note about alternative editors)
 
(4 intermediate revisions by 3 users not shown)
Line 10: Line 10:
 
#*The read more link may be removed by deleting in the same way as text. Select by clicking on the line, note the line break will NOT be highlighted when selected, however the horizontal bar icon on the WYSIWYG toolbar will show it is selected, then click delete.
 
#*The read more link may be removed by deleting in the same way as text. Select by clicking on the line, note the line break will NOT be highlighted when selected, however the horizontal bar icon on the WYSIWYG toolbar will show it is selected, then click delete.
 
#Click the ''Save'' or ''Apply'' toolbar buttons to save the Article.
 
#Click the ''Save'' or ''Apply'' toolbar buttons to save the Article.
# Note: The article title in the read more link can be removed by using output overrides. For general information see [[Understanding_Output_Overrides#Module_Layout_Overrides | Understanding Output Overrides]]. To disable the titles using output overrides, visit the <joomla_root>/templates/<your template>/html/com_content/ folder and visit the folder which correspondes with your chosen layout. For example, to change the frontpage layout, visit <joomla_root>/templates/<your template>/html/com_content/frontpage/default_item.php and scroll to line 111 (Joomla v1.5.18). Change the if/else statement to the title of your choice. For example:
 
 
<source lang="javascript">
 
<?php if ($this->item->readmore_register) :
 
echo JText::_('Register to read more...');
 
else :
 
  echo "Read more";
 
endif;
 
</source>
 
 
  
 
Note:
 
Note:
  
 
*The "read more" function works only in articles published in blog layout.
 
*The "read more" function works only in articles published in blog layout.
 +
*The 'Show "readmore"' must be set to Show.
 +
*The 'Show title with readmore' may be set to Show.
 +
*The text for the readmore can be set globally with a language override and at the article itself.
 
*When the read more link is clicked the entire Article will be displayed unless the Article parameter ''Show Intro text'' has been set to '''Hide'''. In this case only the content after the read more link will be displayed.
 
*When the read more link is clicked the entire Article will be displayed unless the Article parameter ''Show Intro text'' has been set to '''Hide'''. In this case only the content after the read more link will be displayed.
 +
*In some editors (JCE for example) there is a button in the editor toolbar which can be used to create the 'Read more' in preference to the button below the editor panel.
 +
 +
[[Category:Tips and tricks]]

Latest revision as of 08:34, 5 October 2014

It is common to display introductory text with a link to the rest of the article. To split an article into an introduction with a link to read more:

  1. Open the Article for editing either by:
    • Click the Content > Article Manager menu item to go to the Article Manager, select the Article and click the Edit toolbar button.
    • Clicking the Add New Article button in the Control Panel.
    • If logged in to the Front-end, you have appropriate permissions and are viewing the Article you wish to edit: Click the Edit toolbar button.
  2. If you have not already done so, write the complete Article text in the editor.
  3. Decide where you would like the introduction to finish and the read more link to appear. Place the cursor in this position.
  4. Click the Read more... editor button at the bottom of the editor. A horizontal rule will appear where the split in the article is placed.
    • The horizontal rule will not be displayed in the Article. It is only used as a marker for the system when displaying the page.
    • The read more link may be removed by deleting in the same way as text. Select by clicking on the line, note the line break will NOT be highlighted when selected, however the horizontal bar icon on the WYSIWYG toolbar will show it is selected, then click delete.
  5. Click the Save or Apply toolbar buttons to save the Article.

Note:

  • The "read more" function works only in articles published in blog layout.
  • The 'Show "readmore"' must be set to Show.
  • The 'Show title with readmore' may be set to Show.
  • The text for the readmore can be set globally with a language override and at the article itself.
  • When the read more link is clicked the entire Article will be displayed unless the Article parameter Show Intro text has been set to Hide. In this case only the content after the read more link will be displayed.
  • In some editors (JCE for example) there is a button in the editor toolbar which can be used to create the 'Read more' in preference to the button below the editor panel.