Cobbled my first {News} setup together.
In the summary template, each title links to a detail page where the individual single news article is displayed.
I got this to work.
To finalize the module, I was of going to use the article title as my page title.
When NOT using "mod_rewrite" the link from summary page to detail page works ( and all others ).
When using "mod_rewrite" it does not (404).
Now, I think I have to use mod_rewrite for SEO friendly URL rewrites, because I am using Xampp/Vista home dev, and from what I read "Pretty Urls" does not work properly/well on windows servers.
"News-summary-tpl" Template ( contains title link to detail page)
<a href="{$entry->moreurl}" title="{$entry->title| cms_escape:htmlall}">
{$entry->title|cms_escape}</a>
"News-detail-tpl" Template (contains logic for url rewrite)
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
{assign var="pagetitle" value=$entry->title|escape}
"home" page ( contains news summary with the links)
{news detailpage="news-detail" detailtemplate="News-detail-tpl"}
("news-detail" is the Page Alias as well as the Url. It is an empty file with one )
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
{stylesheet name="op2-css"}
{metadata}
{if isset($pagetitle) && !empty($pagetitle)}
<title>{sitename} {$pagetitle} </title>
{else}
<title>{sitename} - {title}</title>
{/if}
</head>
config.php
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.htm';
#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
$config['use_hierarchy'] = true;
$config['internal_pretty_urls'] = false;
In mod_rewrite, while hovering over the news title link the addressbar reads: ../news/date/article-title/d,News-detail-tpl.htm
With Pretty Urls, while hovering over the news title link the addressbar reads: "http://localhost/op2/index.php?mact=New ... eturnid=21"
CMSms v1.9.4.1 Xampp/Vista home dev
thanks
{News} + mod_rewrite
Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Let us know here.
Jump to
- Official Boards
- ↳ README FIRST!!!
- ↳ Announcements
- ↳ General Discussion
- Support Boards
- ↳ CMSMS Core
- ↳ Modules/Add-Ons
- ↳ Help Wanted (commercial)
- ↳ Translations
- Community Boards
- ↳ Tips and Tricks
- ↳ CMS Show Off
- ↳ Layout and Design (CSS & HTML)
- ↳ Feature ideas
- ↳ Developers Discussion
- ↳ The Lounge
- International Discussions
- ↳ Czech/Slovak - Česky/Slovensky
- ↳ Danish - Dansk
- ↳ Dutch - Nederlands
- ↳ Aankondigingen
- ↳ Tips en Trucs
- ↳ Vertalingen & Documentatie
- ↳ Hulp gezocht (commercieel)
- ↳ Finnish - Suomi
- ↳ French - Français
- ↳ German - Deutsch
- ↳ BITTE ZUERST LESEN !!!
- ↳ Ankündigungen
- ↳ Installation und Einstellungen
- ↳ Module und Tags
- ↳ Smarty-Tipps und -Tricks
- ↳ Layout und Design
- ↳ Suchmaschinenoptimierung (SEO)
- ↳ HowTo's
- ↳ Übersetzungen
- ↳ Show Off
- ↳ Hilfe gesucht (kommerziell)
- ↳ Stammtisch
- ↳ Hungarian - Magyar
- ↳ Italian - Italiano
- ↳ Moduli/Plugins
- ↳ Lithuanian - Lietuviškai
- ↳ Darbo / bendradarbiavimo pasiūlymai ir paieška
- ↳ Persian / Farsi
- ↳ Polish - Polski
- ↳ Portuguese - Português
- ↳ Russian - русский
- ↳ Предложения и поиск РАБОТЫ
- ↳ Spanish - Español
- ↳ Swedish - Svenska
- Geekmoot Editions
- ↳ Geekmoot 2016
- ↳ Connections and Conversations
- ↳ Geekmoot 2015
- ↳ Geek Moot 2012
- ↳ Locked: Geek Moot 2010
- Old Forums
- ↳ [locked] CMSMS 2.0 Beta
- ↳ Module Developers
- ↳ Closed Issues
- ↳ [locked] Documentation0ld
- ↳ Suggestions, Modifications & Corrections
- ↳ [locked] CMSMS 1.11 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 1.10 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 2.2 Beta
- ↳ [locked] CMSMS MLE fork
- ↳ Modules/Addon patchs
- ↳ [locked] Quality Assurance
- ↳ [locked] Accessability and Usability
- ↳ [locked] Documentation
- ↳ Media and presentations about CMSMS
- ↳ [locked] Installation, Setup and Upgrade