Login  Register

Re: Duplicate title tags and meta descriptions

Posted by Harvey on Oct 22, 2011; 12:27pm
URL: https://support.nabble.com/Duplicate-title-tags-and-meta-descriptions-tp6759630p6920023.html

Currently my subsequent pages do have separate title tags so there must be n.cases in there somewhere. Although the odd thing is that I have created new forums since you made this change for me so there must be a rule that will extend to any forum. (?)

On Sat, Oct 22, 2011 at 1:26 AM, Hugo <Nabble> [via Nabble Support] <[hidden email]> wrote:
Mark, below is a sample code that should work for you. Here is the explanation: for each app title you want to customize you have to create a "n.case" block that prints the title of that app. I've create the cases for "The Woodstove" and "Summer Sports" below, so now you can follow that idea and add new cases for the other forums. Please try that code and let us know what should be the next step (maybe the post titles?). Questions?

<override_macro name="app_title">
  <title><n.compress.>
    
    <n.switch. value="[n.page_node.subject/]">
      
      <n.case. value="The Woodstove">
        <n.custom_title page1="The Woodstove: Skiing, Snow, Mountains" pageN="The Woodstove: Page #"/>
      </n.case.>
      
      <n.case. value="Summer Sports">
        <n.custom_title page1="Summer Sports: Hiking, Camping, Paddling, Biking" pageN="Summer Sports: Page #"/>
      </n.case.>
      
      <n.default_case.>
        <n.page_node.app_title_contents/>
        <n.page_node.app_title_ending/>
      </n.default_case.>
      
    </n.switch.>    
    
    </n.compress.></title>
</override_macro>


<macro name="custom_title" parameters="page1, pageN">
  NY Ski Forums |
  <n.if.equal value1="[n.app_page_number/]" value2="1">
    <then.page1/>
    <else>
      <n.regex_replace_all. pattern="#" replacement="[n.app_page_number/]">
        <n.pageN/>
      </n.regex_replace_all.>
    </else>
  </n.if.equal>
  | Harvey Road 
</macro>
Official Nabble Administrator - we never ask for passwords.



If you reply to this email, your message will be added to the discussion below:
http://nabble-support.1.n2.nabble.com/Duplicate-title-tags-and-meta-descriptions-tp6759630p6919443.html
To unsubscribe from Duplicate title tags and meta descriptions, click here.



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: www.NYSkiBlog.com
NY Ski Forum: forum.NYSkiBlog.com
NY Ski Magazine: mag.NYSkiBlog.com

HTTPS Please!