We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33968
    • 863 Posts
    @beernuts2: sounds like you want a plugin which fires on OnDocFormSave.

    That might look something like this - not tested but you get the idea:
    <?php
    // limit this to a specific template or it will run on every resource
    $templateId = 7; 
    
    if ($resource->get('template) === $templateId) {
        $tv1 = $resource->getTVValue('TV1 Name');
        $tv2 = $resource->getTVValue('TV2 Name');
        $tv3 = $resource->getTVValue('TV3 Name');
    
        $pagetitle = "$tv1 $tv2 $tv3";
        $resource->set('pagetitle', $pagetitle);
        $resource->save();
    }
    
      • 36345
      • 26 Posts
      For dynamic HTML title and description ( <title>xyz</title> and <meta name="description" content="12345" /> ) I did the following:

      In my template:
      <title>[[*longtitle]]</title>
      <meta name="description" content="[[*description]]">


      In the Resource's Document tab:
      Long Title: [[!setPageTitle]]
      Description: [[!setPageDesc]]

      I then have two snippets called setPageTitle and setPageDesc that generate the title and description from information in the database row for the current item.