Omeka Classic Logo
  • What’s new in Omeka
  • Tutorials
  • Reference
    • Global (Theming) Functions
    • Hooks
    • Filters
    • models
    • views/helpers
    • controllers
    • Packages
      • Acl
      • Application
      • Auth
      • Captcha
      • Controller
      • Db
      • File\Derivative
      • Filter
      • Form
      • Global Functions
        • Db-related functions
        • Locale-related functions
        • Log-related functions
        • Plugin-related functions
        • Search-related functions
        • Text-related functions
        • User-related functions
        • Utility-related functions
        • View-related functions
      • Http
      • Install
      • Job
      • Navigation
      • Output
      • Plugin
      • Record
      • Session
      • Storage
      • Test
      • Validate
      • View
    • libraries/Omeka
    • Omeka REST API
  • Helping With Documentation
  • Registering a new module or theme with omeka.org
Omeka Classic
  • Reference
  • Global (Theming) Functions
  • link_to — Get a link to a page within Omeka.
  • View page source

link_to — Get a link to a page within Omeka.

Navigation-related functions

Summary

link_to($record, $action = null, $text = null, $props = array(), $queryParams = array())

Get a link to a page within Omeka.

The controller and action can be manually specified, or if a record is passed this function will hand off to record_url to automatically get a link to that record (either its default action or one explicitly chosen).

Parameters:
  • $record (Omeka_Record_AbstractRecord|string) – The name of the controller to use for the link. If a record instance is passed, then it inflects the name of the controller from the record class.

  • $action (string) – The action to use for the link

  • $text (string) – The text to put in the link. Default is ‘View’.

  • $props (array) – Attributes for the <a> tag

  • $queryParams (array) – the parameters in the uri query

Returns:

string HTML

Usage

Examples

See Also

Previous Next

© Copyright 2012-2023, Omeka.

Built with Sphinx using a theme provided by Read the Docs.