Like this http://www.firmex.com/blog/MA-Master-Class-Part2/
in segment1 > weblog
in segment2 > url_title
and what to do if i want to use categories and i want this?
site.com/weblog/category/title-of-article
Thank you in advance
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
November 14, 2011 7:15am
Subscribe [3]#1 / Nov 14, 2011 7:15am
Like this http://www.firmex.com/blog/MA-Master-Class-Part2/
in segment1 > weblog
in segment2 > url_title
and what to do if i want to use categories and i want this?
site.com/weblog/category/title-of-article
Thank you in advance
#2 / Nov 14, 2011 11:34am
edit: the first request is for title_permalink. Now i use {title_permalink='article/view'}
#3 / Nov 14, 2011 5:04pm
If you want more control then you might want to look into something like http://devot-ee.com/add-ons/md-detect-page-type/
#4 / Nov 14, 2011 7:31pm
Fedor,
You should be able to achieve what you want by putting in the single entry code for your channel/weblog in the index template for that template group. If you want to have both a entry listing and a single entry powered off of the same template, that is more complex but can be done using a couple of add-ons such as
let me know if this helps you.
Sean
#5 / Nov 22, 2011 4:30pm
i’m using switchee as explained in this guide > http://eeinsider.com/articles/simpler-expressionengine-urls-with-a-simple-template/
{exp:switchee variable="{segment_2}" parse="inward"}
{case value="#^P(\\\\\\\\\\\\\\\\d+)$#|''"}
{exp:channel:entries
channel="news"
disable="categories|category_fields|member_data"
limit="10"
dynamic="no"
paginate="bottom"
}
<h1><a href="http://{site_url}news/{url_title}">{title}</a></h1>
{news_body}
{paginate}
Page {current_page} of {total_pages} pages {pagination_links}
{/paginate}
{/exp:channel:entries}
{/case}
{case default="Yes"}
{exp:channel:entries
channel="news"
disable="categories|category_fields|member_data|pagination"
limit="1"
url_title="{segment_2}"
}
{if no_results}
No entry found.
{/if}
<h1>{title}</h1>
{news_body}
{/exp:channel:entries}
{/case}
{/exp:switchee}obviusly i changed “channel” with “weblog”, but i receive this error
Fatal error: Call to undefined function get_instance() in /home/mhd-01/www.mysite.it/htdocs/system/plugins/pi.switchee.php on line 27
I think it’s probably a switchee syntax error, but i don’t know how to fix it
#6 / Nov 22, 2011 6:44pm
Fedor,
That is definitely a switchee error. I suggest that you contact the developer for support. Mark Croxton provides excellent support for switchee - I’ve used it and had questions in the past.
Sean
#7 / Nov 23, 2011 4:59am
Hi Sean,
I resolved, i used the wrong version of plugin for ee1.Now it works. The next thing i want to do is use this kind of url for categories:
site.com/weblog/category/url-title
and
site.com/weblog/category/subcategory/url-title
A friend of mine suggest me this code to use with Low-Seg2cat plugin
{exp:weblog:entries
weblog="blog"
sort="asc"
dynamic="yes"
category="{segment_3_category_id}"
disable="member_data|pagination|trackbacks"
}Is it correct? And for permalink what code i should use?
#8 / Nov 24, 2011 7:28pm
Hi Fedor,
Happy to hear you got the switchee issue resolved.
I’m unfamiliar with the Low-Seg2cat plugin. I would recommend you contact the developer for help with that. Also since this is now no longer a technical support question, I’m going to move this thread to community help so that you can get the answers you want.
Don’t hesitate to post again as needed.
Sean