Uploaded image for project: 'ContentBox Modular CMS'
  1. CONTENTBOX-756

SEO Convention for passing title, keywords, description to theme from modules

    Details

    • Type: Improvement
    • Status: Resolved (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0 Beta
    • Fix Version/s: 3.1.0
    • Component/s: Modules, Themes
    • Labels:
      None

      Description

      Currently, in the default theme we have this code
      It accounts for the site tagline, or the currentpage, but there isn't a convention for setting it from the module.
      I think this is vital, and Andrew Davis confirmed he needs this to launch his first app.

      This will be vital with Mapigator too.
      Lets establish a convention for setting the title, keyword, description and maybe even additional meta tags, so the theme can handle it simply.

      Maybe have a theme method to get the title, and it will look in the request(orwhatever we store them in) for those settings, else pull from the page, else the site.

      <!--- Site Title --->
      	<cfif cb.isPageView()>
      		#cb.getCurrentPage().getTitle()#
      	<cfelse>
      		#cb.siteName()# - #cb.siteTagLine()#
      	</cfif>
      

      This will allow the following:

      function index(event,rc,prc){
      	cbhelper.setMetaTitle( 'Gavins cool module' );
      	cbhelper.setMetaKeywords( 'Gavins cool keywords' );
      	cbhelper.setMetaDescription( 'Gavins cool description' );
      	cbhelper.prepareUIRequest( "pages" );
      	event.setView( "home/index" );
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Gpickin Gavin Pickin
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: