Page 1 of 1
Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 8:20 am
by amygdela
Hello,
I use Clean URL's on my website, and I found out something that's a bit annoying. When I add a new page I give it a title, a name for the menu, some contents and save it. Right after saving, you can add an alias for in your URLs, not before you save. So CMSMS can see you're using clean URLs only after saving the page. can that be before I save the page, so i won't have to go back?
It's pittyful that's nagging again, because I don't like CAPS in the Aliasses of the URLs, but I do like a Cap for the text in the menu...
I hope you get what I mean..!
My second thing is: I wanna show the titles of the newsmessages in my breadcrumbs. So I made a new template and added this to it:
Code: Select all
<h2>{breadcrumbs delimiter='»' initial='0'} » {$entry->title}</h2>
But smarty won't recognize the title outside of the message. For an online example:
http://www.heilemafiscaal.nl/web/index. ... eturnid=30
Look at the breadcrumb. It says HOMEPAGE >> {I want the title here}
Can that be done? Thanks for any help.
The third thing I got...
when printing a newsmessage, it shows the self_links as actual code:
http://www.heilemafiscaal.nl/web/index. ... eturnid=30
Can that be changed?
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 9:13 am
by petert
amygdela wrote:
I use Clean URL's on my website, and I found out something that's a bit annoying. When I add a new page I give it a title, a name for the menu, some contents and save it. Right after saving, you can add an alias for in your URLs, not before you save. So CMSMS can see you're using clean URLs only after saving the page. can that be before I save the page, so i won't have to go back?
This forum software has a great search function, typing in 'auto alias' in the search field gave me a lot of results. Your answer is in this topic:
http://forum.cmsmadesimple.org/index.php/topic,1534.0.html
But I am sure when using the search function you will be able to find more detailed solutions.
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 9:57 am
by amygdela
Thank you, that solves one of the problems!! I've searched, but I couldn't think of that searchterms... (B)
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 9:59 am
by westis
amygdela wrote:
Hello,
I use Clean URL's on my website, and I found out something that's a bit annoying. When I add a new page I give it a title, a name for the menu, some contents and save it. Right after saving, you can add an alias for in your URLs, not before you save. So CMSMS can see you're using clean URLs only after saving the page. can that be before I save the page, so i won't have to go back?
It's pittyful that's nagging again, because I don't like CAPS in the Aliasses of the URLs, but I do like a Cap for the text in the menu...
I hope you get what I mean..!
Like the link that petert provided says, you can set this in config.php.
Find
Code: Select all
$config['auto_alias_content'] = true;
and set it to true.
But I agree that this should be brought back to the admin, under the Options tab. Especially since all pages that include non-English characters will get a messed up page alias too. There will be a fix for this in future releases, but for current releases we have to fix this manually.
My second thing is: I wanna show the titles of the newsmessages in my breadcrumbs. So I made a new template and added this to it:
Code: Select all
<h2>{breadcrumbs delimiter='»' initial='0'} » {$entry->title}</h2>
But smarty won't recognize the title outside of the message.
I think you can try the thing that makes tags to work in news templates:
Try replacing {$entry->title} with {eval var=$entry->title}
The print thing I'm not sure about how to fix.
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 10:08 am
by amygdela
The solution for the newstitle gives me an error:
Warning: Smarty error: eval: missing 'var' parameter in /home/heilem61/public_html/web/lib/smarty/Smarty.class.php on line 1088
I guessed I miss something?
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 10:11 am
by petert
amygdela wrote:
Warning: Smarty error: eval: missing 'var' parameter in /home/heilem61/public_html/web/lib/smarty/Smarty.class.php on line 1088
Did you put:
{eval var=$entry->title} in the template?
Post your template here please.
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 10:14 am
by amygdela
No need for a full template I guess?
Code: Select all
<span id="core_header_h2">
<h2>{breadcrumbs delimiter='»' initial='0'} » {eval var=$entry->title}</h2>
</span>
EDIT..
Do you mean I have to place that tag WITHIN the news template? I mean the news summary template? Cause now I've just placed that in a template I've created...
Here's that template, for the record:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administratiekantoor Heilema te Papendrecht. | {menu_text}</title>
<meta http-equiv="imagetoolbar" content="no" />
<meta name="description" content=" Voor Financiële Administratie, Loonadministratie, Startersbegeleiding en meer...!" />
<meta name="keywords" content="administratie, kantoor, boekhouding, papendrecht, belastingadvies, aangifte, zuid-holland" />
<meta name="author" content="Jasper A. van der Meer, JMstudio.nl Webdesign" />
<meta name="copyright" content="(c) Administratiekantoor Heilema te Papendrecht" />
{stylesheet}
<base href="http://www.heilemafiscaal.nl/web/" />
</head>
</__body>
<div id="container">
<div id="header_container">
<div id="header-left"></div>
<div id="header-center"></div>
<div id="header-right"></div>
</div>
<div id="navbar">
<!-- START MENU -->
{cms_module module='EllNav' horizontal=1 toponly='1' cssid='topmenu'}
<!-- STOP MENU -->
</div>
<div id="core_container">
<!-- START CORE -->
<div id="core_header">
<span id="core_header_h1">
<h1>nieuws</h1>
</span>
<span id="core_header_h2">
<h2>{breadcrumbs delimiter='»' initial='0'} » {eval var=$entry->title}</h2>
</span>
</div>
<div id="core_left">
{cms_module module='news' moretext="Lees verder" dateformat='%d-%m-%Y' returnid="50"}
</div>
<div id="core_right">
{content}
</div>
<!-- STOP CORE -->
</div>
<div id="footer"></div>
</div>
<!-- EINDE CONTAINER -->
<__body>
</__html>
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 10:20 am
by petert
amygdela wrote:
Code: Select all
<span id="core_header_h2">
<h2>{breadcrumbs delimiter='»' initial='0'} » {eval var=$entry->title}</h2>
</span>
Works for me. It works in the detail and in the summary template.
Strange....
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 10:22 am
by amygdela
see my edit. Does that tag only works in the newstemplate itself?
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 10:31 am
by petert
amygdela wrote:
see my edit. Does that tag only works in the newstemplate itself?
yup, {eval var=$entry->title}
the entry part is what you get from the foreach statement.
There is no entry part on the other pages (standard that is)
Re: Clean URLs and alias / Showing news / Printing news
Posted: Sat Dec 31, 2005 11:34 am
by amygdela
ok thnx, but that doesn't work for my setup, cause the breadcrumbs are not in the newstemplate.....
Re: Clean URLs and alias / Showing news / Printing news
Posted: Fri Jul 07, 2006 9:49 pm
by ddpkts
hi,
I've got the same problem when clean urls are on news module shows an error
Code: Select all
string(43) "Smarty error: eval: missing 'var' parameter"
the first idea ant quickest way to bypass this error is to create .htaccess file
Code: Select all
RewriteEngine on
RewriteRule ^index.php/news/(.*)/(.*) index.php?mact=News,cntnt01,detail,0&cntnt01articleid=$1&cntnt01returnid=$2