Duplicate title tags and meta descriptions

classic Classic list List threaded Threaded
102 messages Options
123456
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
OK thanks. I still can't figure out why the duplicates are running rampant.

I will continue to think about it.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
Can we do this now:

http://nabble-support.1.n2.nabble.com/Duplicate-title-tags-and-meta-descriptions-tp6759630p6803041.html

Should I do it or should you?  If me - can you give me some tips?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>
First take a look at view_board › app_title › app_title_contents › default_app_title_contents please. Tell me any doubts you have.
Nabble staff. We never ask for passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
Peter - I have been in that spot many times. I don't see how the subsequent page title tags are generated on Topics view or on subsequent pages of posts.

Also I would like to remove the extra code that is in each app that is designed for the other app's titles. \\

If I remove this:

<n.if.is_root>
                <then>
                    NY Ski Magazine | The Mountains Less Traveled | Harvey Road
                </then>
                <else>
                    <n.if.is_post>
                        <then>
                            <n.subject/> | NY Ski Magazine
                        </then>
                        <else>
                            NY Ski Magazine | <n.subject/> | Harvey Road
                        </else>
                    </n.if.is_post>
                </else>

does that remove the unneccessary code from the Forum?    

On Mon, Oct 17, 2011 at 9:54 PM, Peter <Nabble> [via Nabble Support] <[hidden email]> wrote:
First take a look at view_board › app_title › app_title_contents › default_app_title_contents please. Tell me any doubts you have.
Nabble staff. 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-tp6759630p6902963.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!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>
I could tell you what to do but then you wouldn't be standing on your feet.
Let's do it like this: create another app (maybe a private one?) on nabble and post the address here. I will apply on it the same customizations you have. This way you can make it your test application. All you would need to do to figure out the answer is removing the code you mention and see what happens. This also reduces the delay between posting a question and waiting for an answer.

Just remember when deleting a code that if you delete <n.if.is_root> then you have to delete </n.if.is_root>. Don't leave unmatched tags behind. ;-)
Nabble staff. We never ask for passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
Looks like I made a mistake:



I understand the general concept of having to close tags, but I can't see the mistake in LINE 19:



Does RED mean it's a mistake? Would removing line 20 and 21 fix this issue?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>
The </else> in line 19 should be a </then>  to match that of line 3.

When you have doubts like that, copy the whole thing to the notepad find the most inner if, check if everything is closed in it and delete from the <if> to the </if>.

Then you will have a smaller code. Repeat the operation until you find the unmatched tag.
Nabble staff. We never ask for passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
I deleted lines but didn't change anything.  This proves I'm beyond my ability with this. I will  keep trying.

I'm surprised that with an error the test forum continues to operate. At least I think it is.

On Thu, Oct 20, 2011 at 8:25 PM, Peter <Nabble> [via Nabble Support] <[hidden email]> wrote:
The </else> in line 19 should be a </then>  to match that of line 3.

When you have doubts like that, copy the whole thing to the notepad find the most inner if, check if everything is closed in it and delete from the <if> to the </if>.

Then you will have a smaller code. Repeat the operation until you find the unmatched tag.
Nabble staff. 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-tp6759630p6915346.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!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>
I will have to disagree. It does not prove that. You were on the right path, you suspected of unmatched tags. You just didn't pay enough attention (or didn't spend enough time) to find it. But you were right about the problem and about the solution. So I guess it doesn't prove you can't do it. Quite the opposite.
Nabble staff. We never ask for passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
OK I see what I did. It wasn't that I should have changed line 19 it was that I delete one line at the top that I shouldn't have and left one line at the bottom that I should have deleted. Or maybe it was the opposite. Basically an ELSE...

...everything between <else> and </else> is a complete chunk that  can be removed without error. It may not do what you want, but you won't get an error.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
I think I removed the extra code from the newspaper. The error is gone anyway.

For the forum though I get the opposite error. When I change the </else> to </then> THEN I get an error. I have a feeling it is becuase in this case I want to KEEP the second part of the code and remove the first?  Do I have to change value2="forum" ?


<override_macro name="default_app_title_contents" requires="node">
  <n.if.equal value1="[n.root_node.type/]" value2="news">
    <then>
      <n.if.is_root>
        <then>
          NY Ski Magazine | The Mountains Less Traveled | Harvey Road
        </then>
        <else>
          <n.if.is_post>
            <then>
              <n.subject/> | NY Ski Magazine
            </then>
            <else>
              NY Ski Magazine | <n.subject/> | Harvey Road
            </else>
          </n.if.is_post>
        </else>
      </n.if.is_root>
    </then>
    <else>
      <n.if.is_root>
        <then>
          NY Ski Forum | Trip Reports, Ski Conditions, Snow Sports | Harvey Road
        </then>
        <else>
          <n.if.is_post>
            <then>
              <n.subject/> | NY Ski Forum
            </then>
            <else>
              NY Ski Forum | <n.subject/> | Harvey Road
            </else>
          </n.if.is_post>
        </else>
      </n.if.is_root>
    </else>
  </n.if.equal>
</override_macro>
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>


Ok, this code is correct, all tags are properly closed. Now, please, explain to me what exactly are you trying to delete.
Nabble staff. We never ask for passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
Peter <Nabble> wrote
Ok, this code is correct, all tags are properly closed. Now, please, explain to me what exactly are you trying to delete.
Those lines are cool.

The code is correct because you wrote it.

This is the title tag code for my forum.  So I want to delete the Magazine (newspaper) portion.  I tried to do it exactly as I did for the newspaper (where I deleted the Forum part).

Except in this case when I end with  </then> instead of </else> I get an error, and when I put the </else> back I get no error.  

I think it has something to do with the ORDER than the two chunks of code are in. (?)

I am assuming that when code turns RED that means it's an error. I haven't tried to save anything yet.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
So I think this should work:  (?)
 <override_macro name="default_app_title_contents" requires="node">
  <n.if.equal value1="[n.root_node.type/]" value2="forum">
    <then>
      <n.if.is_root>
        <then>
          NY Ski Forum | Trip Reports, Ski Conditions, Snow Sports | Harvey Road
        </then>
        <else>
          <n.if.is_post>
            <then>
              <n.subject/> | NY Ski Forum
            </then>
            <else>
              NY Ski Forum | <n.subject/> | Harvey Road
            </else>
          </n.if.is_post>
        </else>
      </n.if.is_root>
    </then>
  </n.if.equal>
</override_macro> 
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
Actually could I use this since the code is not choosing between two apps?

 <override_macro name="default_app_title_contents" requires="node">
      <n.if.is_root>
        <then>
          NY Ski Forum | Trip Reports, Ski Conditions, Snow Sports | Harvey Road
        </then>
        <else>
          <n.if.is_post>
            <then>
              <n.subject/> | NY Ski Forum
            </then>
            <else>
              NY Ski Forum | <n.subject/> | Harvey Road
            </else>
          </n.if.is_post>
        </else>
      </n.if.is_root>
</override_macro> 
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>
Actually if you use the last one you will apply the same titles to the Forum and the Magazine. That's why I suggested that you keep the if but check for forum instead of news.
Nabble staff. We never ask for passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
So the first of the two solutions is the right one?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>
(...)
        </else>
      </n.if.is_root>
    </then>
    <else>
        <n.overriden/>
    </else>

  </n.if.equal>
</override_macro>

This will make the default macro (the one that you override) execute when it is not the forum.

I would test it before applying. Always test it. Unless you don't mind some minor glitch at the title before you can see it and restore it until you get it fixed.
Nabble staff. We never ask for passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Harvey
I don't understand.

Why must the two apps be tied together?

Where does the first "overridden" tag go?

Sorry to be dense. I guess I can leave it as is. But I removed the "extra" code from the magazine. I didn't exactly understand it, but it seemed to work.

What is the least amount of code I can use to get the title tags I want in the forum?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate title tags and meta descriptions

Peter <Nabble>
Harvey44 wrote
Why must the two apps be tied together?
They don't have to be tied together. You made some requests that were applied to both and we started placing the changes together. You can check what belongs to where and move it if you want.

Harvey44 wrote
Where does the first "overridden" tag go?
There is no first tag. Both this formats are acceptable:

<example_tag>
    you can place things here
</example_tag>

<example_tag/>

When you don't have anything to put between tags, you can open and close with a single declaration by placing the "/" at the end of the tag.

You are going the right way.
Harvey44 wrote
What is the least amount of code I can use to get the title tags I want in the forum?
You are going the right way.
Nabble staff. We never ask for passwords.
123456