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> |
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> "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!
|
Kind of. Take a look at this one for instance. I will explain to you what is being done here:
<n.if.is_root> <---- 1 <then> NY Ski Forum | Trip Reports, Ski Conditions, Snow Sports | Harvey Road </then> <else> <n.if.is_post> <---- 2 <then> <n.subject/> | NY Ski Forum <----- 3 </then> <else> <----- 4 NY Ski Forum | <n.subject/> | Harvey Road <--- 5 </else> </n.if.is_post> </else> </n.if.is_root> 1 - we are checking to see if that particular page is a root node. This means the root of your site, your main page. If it is the root, the "then" will be executed, the "else" won't. The "then" returns the title of your main page. Now we are left with 2 situations to check on the else. We need to know if a subforum is being displayed or if a post is being displayed. 2- we are checking if that is a post. If it is a post, we need to show the subject of the post with " | NY Ski Forum" at the end. That's what we do on 3. 3- the <n.subject> shows the subject of the node on that page. Since we know this code only runs on post's pages (because of the <if><then>, then it is the post's subject. 4- We have already checked if it is the root on 1 and we are in it's "<else>" so it is not the root. We have also checked inside this else if we are on a post page and we know it's not because we are on it's <else>" too. So that leaves us with the subforum page. So that displays the title of your subforum pages -> all of them. All subforum pages are running that code. and then we get to 5. 5- Displays a title in a similar way we do on 3. The only difference is that we add something to the beginning of the subject and something at the end of it instead of only the end. What Hugo proposed will work very well but you would have to change it whenever you add a subforum to add a new n.case. The way you were going was to change what we did that will work for every page dinamically.
Nabble staff. We never ask for passwords.
|
This post was updated on .
I actually understood how you were doing the above and thought it was pretty elegant:
If it's root make it this. If it's post make it that. All others (ie subforums) treat this way. I think that it's simple and good. But within that system I couldn't figure out how you were treating the subsequent pages. They are being handled separately so where are they?
HTTPS Please!
|
We did not specify what to do in subforum case. We told what to do for root, for topic and for "everything else". Subforum is there. Which subsequent paged do you refer to?
Nabble staff. We never ask for passwords.
|
I'm wondering about the subsequent a pages in Topics and subforums:
topics view Page 2, 3, 4 etc subforum Page 2, 3, 4 etc
On Sat, Oct 22, 2011 at 4:12 PM, Peter <Nabble> [via Nabble Support] <[hidden email]> wrote: We did not specify what to do in subforum case. We told what to do for root, for topic and for "everything else". Subforum is there. Which subsequent paged do you refer to? "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!
|
If you go to a topic page you can navigate here:
classic_forum_topic › topic_html › topic_head There you will see this at line 10: <n.topic_title.page_number_ending/> The page_number_ending does what you are asking for. It adds to the topic_title: <macro name="page_number_ending"> <n.hide_if_equals. value1="[n.topic_page_number/]" value2="1"> | <t>Page <t.number.topic_page_number/></t> </n.hide_if_equals.> </macro> The bold if is to "hide" "if" "topic_page_number" "equals" "1". So if the page number is 1, " | <t>Page <t.number.topic_page_number/></t>" is not displayed. That's how that works.
Nabble staff. We never ask for passwords.
|
Can topic_number_ending be used in the middle of a title tag?
I would like to do this: http://nabble-support.1.n2.nabble.com/Duplicate-title-tags-and-meta-descriptions-tp6759630p6803041.html
HTTPS Please!
|
Here is the solution for your post titles:
<override_macro name="topic_title" dot_parameter="ending"> <title><n.compress.> <n.page_node.> <n.if.has_property name="page_title"> <then.get_property name="page_title"/> <else> <n.subject/> <n.hide_if_equals. value1="[n.topic_page_number/]" value2="1"> : Page <n.topic_page_number/> </n.hide_if_equals.> | NY Ski Forums </else> </n.if.has_property> </n.page_node.> </n.compress.></title> </override_macro> |
Thank you very much.
On Mon, Oct 24, 2011 at 2:35 PM, Hugo <Nabble> [via Nabble Support] <[hidden email]> wrote: Here is the solution for your post titles:<override_macro name="topic_title" dot_parameter="ending"> <title><n.compress.> <n.page_node.> <n.if.has_property name="page_title"> <then.get_property name="page_title"/> <else> <n.subject/> <n.hide_if_equals. value1="[n.topic_page_number/]" value2="1"> : Page <n.topic_page_number/> </n.hide_if_equals.> | NY Ski Forums </else> </n.if.has_property> </n.page_node.> </n.compress.></title> </override_macro> "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!
|
In reply to this post by Harvey
Peter it looks like this was only partially implemented. Every subsequent page of a forum (page 2, 3 etc) has the same title tag as the first page. That is going to lead to a bunch of duplicates. Let me know what is going on.
HTTPS Please!
|
This is what Hugo proposed: http://nabble-support.1.n2.nabble.com/Duplicate-title-tags-and-meta-descriptions-tp6759630p6926144.html
It should work as expected.
Nabble staff. We never ask for passwords.
|
Here is a screen cap from page 2 of one of my subforums:
It has the same title tag as Page 1 of that forum. The idea was for subsequent pages to be treated like this: NY Ski Forum | {Subforum Name}: Page # | Harvey Road
HTTPS Please!
|
Ok, lets revisit his proposal:
<override_macro name="topic_title" dot_parameter="ending"> <title><n.compress.> <n.page_node.> <n.if.has_property name="page_title"> <then.get_property name="page_title"/> <else> NY Ski Forum | <n.subject/> <n.hide_if_equals. value1="[n.topic_page_number/]" value2="1"> : Page <n.topic_page_number/> </n.hide_if_equals.> | Harvey Road </else> </n.if.has_property> </n.page_node.> </n.compress.></title> </override_macro> The most important is: NY Ski Forum | <n.subject/> <- will display the subject <n.hide_if_equals. value1="[n.topic_page_number/]" value2="1"> <-this if hides the content if the page number is 1 : Page <n.topic_page_number/> <- ": Page X" will display the page number but since it is inside the if, it will only be displayed if it's not "1" </n.hide_if_equals.> | Harvey Road <- the end
Nabble staff. We never ask for passwords.
|
Maybe I'm not understanding what a "topic" is.
Each thread is working as I'd hoped. It's the forum and the topics views that are still working the old way. I am sorry I can't follow the naml code.
HTTPS Please!
|
There's nothing to be sorry about. It is something new and there is nothing very much like NAML around so it is ok to not follow it at first. Even then I must say you are going very well with it.
A topic is a thread. It is a post with replies. When you see the list of conversations on a subforum and you want to start something on a new subject, you click "new topic" at the upper right corner, right? Then everything that follows that first post (including itself) is a topic and the topic may display several pages. If you got it right you will realize your problem is with the topics title because every page displays the same title. So what you want would be something like: Forum | <topic subject>: Page <page number> | Site but you only want the ":Page <page number>" to be shown when it is not the first page. Hence the condition to not show that when the page number is "1" (so we know it is the first page). It would seem like: Forum | <topic subject> <if page isn't 1> :Page <page number> | Site Now look at the code I posted and see if it makes sense. It is important that you understand it (not only you but everyone else) so you can feel free to change whatever you want and once you feel comfortable and understand how it works you will even have new ideas that you wouldn't since now you have a more powerful tool at hand and you may end up doing things that will in fact give you an edge towards your goals.
Nabble staff. We never ask for passwords.
|
This is not really a NAML issue?
But it is about duplicates. Both Titles and Descriptions are still an issue, but I'm going to stay with titles for the moment. The page numbers titles don't always load. For some reason this is more prevalent in the lower pages numbers (2,3,4,5 etc) than the higher numbers. I was letting it go figuring that as long as google indexed the title properly that was fine. But this error is new today: Duplicate Titles: Titus Mountain Sold | NY Ski Forum /Titus-Mountain-sold-td3393120.html /Titus-Mountain-sold-td3393120i20.html The title itself is for page 1 of a thread, but page 3 is displaying the same title. Here's another one: Glens Falls Post Star Editorial: Tax Funds for ORDA | NY Ski Forum /Glens-Falls-Post-Star-Editorial-About-Tax-Funds-for-ORDA-td3407351.html /Glens-Falls-Post-Star-Editorial-About-Tax-Funds-for-ORDA-td3407351i10.html /Glens-Falls-Post-Star-Editorial-About-Tax-Funds-for-ORDA-td3407351i20.html /Glens-Falls-Post-Star-Editorial-About-Tax-Funds-for-ORDA-td3407351i30.html /Glens-Falls-Post-Star-Editorial-About-Tax-Funds-for-ORDA-td3407351i70.html
HTTPS Please!
|
It seems to be a bug. I'll check it.
Nabble staff. We never ask for passwords.
|
It's working for me. I'm finding it hard to reproduce it.
Nabble staff. We never ask for passwords.
|
This post was updated on .
These two examples took a minute to create/find. It certainly is not consistent. (I'd say the proper tag loads 50% of the time). But as noted above, Google is finding the error.
HTTPS Please!
|
Free forum by Nabble | Edit this page |