Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-01-29 20:21:18
- John Wozniak
- Member
- Registered: 2006-10-20
- Posts: 37
How do I change the default homepage/section if...
I don’t have Textpattern installed in the top level of my public dir but in mydomain.com/cms. I would like to default the homepage to a section of my choosing but when I change the site URL in admin>preferences to mydomain.com/cms/articles for example, it breaks the site and the CSS is no longer linked. How can I get the default homepage to be a certain section?
Thanks.
Last edited by John Wozniak (2007-01-30 01:16:54)
Offline
Re: How do I change the default homepage/section if...
You should not change the site url…
You could use either a plugin (glx_if) which provides an if _frontpage option (for you it would be /cms/
or you can go the native way
<txp:if_section name=""><txp:article_custom form="your form" limit="10" section="articles">
<txp:else />
<txp:article limit="10" />
</txp:if_section>
hope this is of help
Last edited by colak (2007-01-30 08:55:45)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2007-01-30 14:11:30
- John Wozniak
- Member
- Registered: 2006-10-20
- Posts: 37
Re: How do I change the default homepage/section if...
Thanks for the suggestions. I installed the plugin and also tried the code snippet. I am not sure either is what I am after but I couldn’t really get either to work as I desired – do entirely to me I am sure but either way I haven’t gotten it quite figured out/working.
I am using glx_hl_current to show the current tab in the nav. I want the site to default to a section of my choosing and or if it is a home page I can make a home tab but I would want to show that it is current and/or duplicate the articles section for the frontpage – just as long as it shows that it is current.
Right now I have a redirect in the default page to simulate what I want (essentially bypassing the frontpage). So if you go http://johnwozniak.com/cms you will end up at http://johnwozniak.com/cms/articles where you can see the tab is highlighted.
I just don’t like it when the nav is stateless and the same on every single page without any visual queues where you are – that is all I am trying to accomplish.
Breadcrumbs would be nice too but I will take it one step at a time till I get each piece of functionality just right.
Thanks again for your help. Soon it won’t be such a struggle when I get better with Textpattern.
Offline
Re: How do I change the default homepage/section if...
John Wozniak wrote:
Thanks for the suggestions. I installed the plugin and also tried the code snippet. I am not sure either is what I am after but I couldn’t really get either to work as I desired – do entirely to me I am sure but either way I haven’t gotten it quite figured out/working.
I am using glx_hl_current to show the current tab in the nav. I want the site to default to a section of my choosing and or if it is a home page I can make a home tab but I would want to show that it is current and/or duplicate the articles section for the frontpage – just as long as it shows that it is current.
I guess that you know that glx_hl_current is different to the glx_if
Right now I have a redirect in the default page to simulate what I want (essentially bypassing the frontpage). So if you go http://johnwozniak.com/cms you will end up at http://johnwozniak.com/cms/articles where you can see the tab is highlighted.
I just don’t like it when the nav is stateless and the same on every single page without any visual queues where you are – that is all I am trying to accomplish.
Some people solve this issue by using section specific code
ie
<txp:if section name="">
<txp:output_form form="menu_home" />
</txp:if section>
<txp:if section name="articles">
<txp:output_form form="menu_articles" />
</txp:if section>
<txp:if section name="resources">
<txp:output_form form="menu_resources" />
</txp:if section>
etc
Where all the menu codes are basically the same except for the highlight which corresponds to the active section
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline