Clean URLs and alias / Showing news / Printing news

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
amygdela

Clean URLs and alias / Showing news / Printing news

Post 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?
Last edited by amygdela on Sat Dec 31, 2005 8:42 am, edited 1 time in total.
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: Clean URLs and alias / Showing news / Printing news

Post 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.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
amygdela

Re: Clean URLs and alias / Showing news / Printing news

Post by amygdela »

Thank you, that solves one of the problems!! I've searched, but I couldn't think of that searchterms... (B)
westis

Re: Clean URLs and alias / Showing news / Printing news

Post 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.
amygdela

Re: Clean URLs and alias / Showing news / Printing news

Post 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?
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: Clean URLs and alias / Showing news / Printing news

Post 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.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
amygdela

Re: Clean URLs and alias / Showing news / Printing news

Post 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>
Last edited by amygdela on Sat Dec 31, 2005 10:20 am, edited 1 time in total.
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: Clean URLs and alias / Showing news / Printing news

Post 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....
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
amygdela

Re: Clean URLs and alias / Showing news / Printing news

Post by amygdela »

see my edit. Does that tag only works in the newstemplate itself?
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: Clean URLs and alias / Showing news / Printing news

Post 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)
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
amygdela

Re: Clean URLs and alias / Showing news / Printing news

Post by amygdela »

ok thnx, but that doesn't work for my setup, cause the breadcrumbs are not in the newstemplate.....
ddpkts

Re: Clean URLs and alias / Showing news / Printing news

Post 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
Locked

Return to “CMSMS Core”