Directory customization

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Directory customization

Harvey
I'd like to be able to customize the column headers in my directories sub apps.

I am branching out and not everything is a ski area:

HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
Hi,
Where is this sub app?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
I'd like to be able to do this for all the subapps of

directory.nyskiblog.com

About half I won't change but  the other half I would like to.

Also the term "Regions" at the top level is no longer fully accurate. Can I change that?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
Could you tell me which sub apps you want to change the header?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
I'd like to be able to do it on any of them.

I guess it would be these to start:



Also the word "regions" at the main level isn't exactly correct anymore.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
We are working on it.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
It's not a rush. Thank you.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
Hi,
to change the "Regions" text, go to Macro Search and search for "Regions" on Macro source contains.
At "translation: Subcategories", you will see this line:
<override_translation><from>Subcategories</from><to><n.translate forum="Sub-forums" news="Regions"/></to></override_translation> 
replace the text "Region" with what you want.


To change the Ski Area header eventually, you will have to create two macros. Go to your Advanced Editor and create these two macros:
<macro name="app_header" parameters="subapp,header" >
    <n.if.equal value1="[n.page_node.subject/]" value2="[n.subapp/]">
        <then><n.header/></then>
    </n.if.equal>
</macro>

<macro name="harvey_header">
    <n.set_var. name="header">
        <n.app_header subapp="sub_app_name1" header="new_header1"/>
        <n.app_header subapp="sub_app_name2" header="new_header2"/>
    </n.set_var.>
    <n.if.is_empty.remove_spaces.var name="header">
        <then>Ski Areas</then>
        <else><n.var name="header" /></else>
    </n.if.is_empty.remove_spaces.var>
</macro>
So, when you want to create a new header modification, you should add new lines like 9 and 10. Example: to change the Header of "NY Ski Area History" to "Events", add this line:
<n.app_header subapp="NY Ski Area History" header="Events"/>
So the macro will be like this:
<macro name="harvey_header">
    <n.set_var. name="header">
        <n.app_header subapp="NY Ski Area History" header="Events"/>
    </n.set_var.>
    <n.if.is_empty.remove_spaces.var name="header">
        <then>Ski Areas</then>
        <else><n.var name="header" /></else>
    </n.if.is_empty.remove_spaces.var>
</macro>
After you create these macros, edit the macro "news_sidebar_widget", replace this line:
<t>Topics</t>
with this one:
<n.harvey_header/>
I can make all these changes for you if you want.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
Pedro <Nabble> wrote
I can make all these changes for you if you want.
This part I understand!  :)
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
Harvey, will you change it by yourself or should I do it for you?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
I should probably try to do it.  Since I want to try a few different options.

Does this allow me to change those headers to be unique in each sub app?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
Yes, but you will have to set it manually.  See that part of the code where you set the header name:
    <n.set_var. name="header">  
        <n.app_header subapp="sub_app_old_name1" header="new_header_name1"/>  
        <n.app_header subapp="sub_app_old_name2" header="new_header_name2"/> 
        <n.app_header subapp="sub_app_old_name3" header="new_header_name3"/>  
        .
        .
        .
    </n.set_var.>  
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
In reply to this post by Pedro
Pedro <Nabble> wrote
Go to your Advanced Editor and create these two macros:
Do I choose Add New File?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
In reply to this post by Pedro
Pedro <Nabble> wrote
Hi,
to change the "Regions" text, go to Macro Search and search for "Regions" on Macro source contains.
At "translation: Subcategories", you will see this line:
<override_translation><from>Subcategories</from><to><n.translate forum="Sub-forums" news="Regions"/></to></override_translation> 
replace the text "Region" with what you want.

How do I do this in just one sub app?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
In reply to this post by Pedro
Pedro <Nabble> wrote
Hi,
to change the "Regions" text, go to Macro Search and search for "Regions" on Macro source contains.
At "translation: Subcategories", you will see this line:
<override_translation><from>Subcategories</from><to><n.translate forum="Sub-forums" news="Regions"/></to></override_translation> 
replace the text "Region" with what you want.
I decided to do the original idea and change "Regions" everywhere to "Sections."

I found an override called Subcategories under and changed Regions and Region in 4 places and that seemed to work.

Is that an equivalent solution?


HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
In reply to this post by Harvey
Harvey44 wrote
Do I choose Add New File?
Yes.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
In reply to this post by Harvey
Harvey44 wrote
Is that an equivalent solution?
Yes, it seems you've found the same macro searching for "Subcategories".
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
I got confused - I found two different macros?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Pedro
No, I saw your code, you override the correct macro.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Directory customization

Harvey
Couldn't find the original directory thread so I'm posting this here.

The directory is expanding.  I'm finding many instances when I'd RATHER have just ONE post before comments instead of THREE.

Is there a simple way to create this format (actually it's the original format) and just specify it for certain directory subdirectories?

I'd rather not add another app, but I could.
HTTPS Please!
12