Linkbar displays links either vertically or horizontally using the alignment selected for each instance of the block.  Links are added through an administrative interface in the dashboard.  The destination (target name) and contact information regarding the link is also maintained in the database and may be viewed and managed through the dashboard.  Links may be hidden without deleting them and the order in which links are displayed is completely within your control.

This is an ideal way to manage html link codes provided by other site operators for your web site.

 

Adding Links Through the Dashboard

When adding a new link, the Target Name, Contact Name and Contact Email values are optional.  These are saved as information for the site administrator who is managing links to external sites.  The Display Order is an integer value used to sort the links in the desired order for display.  The Link Code is the actual HTML code to embed in the web page where the link is to be displayed.

When adding link codes for external sites, make sure that all href values begin with "http://" or the link will be generated by Concrete5 as relative to this site\'s root path.  Also, make sure to add:

target="_blank"

to the anchor so the site opens in a new window.  "_top" could also be used as a target to replace your site with the new site in the current browser window.

Use the Manage Links tab to edit or remove links once created.

linkbar_add_link_page.png

Using the Link Bar on Your Site

Once the links have been added, go to each page where the links are to be displayed and add the Link Bar block to the page.  The Add and Edit interfaces for the block allow you to select horizontal or vertical positioning of the links and to set the alignment of the block to left, center or right.  The links entered through the dashboard tool will display in the block.  Each block instance can have different display properties set according to the page to which it is added.

  add_linkbar_dialog.png      edit_linkbar_dialog.png

To add a link bar to the footer of all pages on the site, add the following to your footer.php file in your site theme:

  
   $a = new Area('LinkBar');

   $a->display($c);

   ?>

Then when you enter edit mode, a block will be available in the footer section to add the Link Bar block.

Managing Links

Any of the values shown in a text box or text area may be edited and saved to the database.  Make the desired changes to the link, then click the "U" button to the right of the fields to save the updates to the database.  Only on link may be edited at a time.

To suppress the display of a specific link, set the value of "disable" to "Y" and update the link information.  Only those links with the "disable" attribute set to "N" will be displayed on the web pages.

To remove a link, simply click the "X" button to the right of the link information and the associated link will be removed.

When editing link codes for external sites, make sure that all href values begin with "http://" or the link will be generated by Concrete5 as relative to this site\'s root path.  Also, make sure to add:

target="_blank"

to the anchor so the site opens in a new window.  "_top" could also be used as a target to replace your site with the new site in the current browser window.

linkbar_manage_link_page.png