Did you edit your htaccess file so your mod_rewrite also can work? Example htaccess.txt can be found on /doc folder of CMSMS, simply change it to .htaccess and upload to you CMSMS root folder, if it's in a subfolder you will have to change RewriteBase setting in .htaccess.
{content item=page}? [solved]
-
uniqu3
Re: {content item=page}?
Maybe you should read some hot to use and how to do help files 
Did you edit your htaccess file so your mod_rewrite also can work? Example htaccess.txt can be found on /doc folder of CMSMS, simply change it to .htaccess and upload to you CMSMS root folder, if it's in a subfolder you will have to change RewriteBase setting in .htaccess.
Did you edit your htaccess file so your mod_rewrite also can work? Example htaccess.txt can be found on /doc folder of CMSMS, simply change it to .htaccess and upload to you CMSMS root folder, if it's in a subfolder you will have to change RewriteBase setting in .htaccess.
-
NaN
Re: {content item=page}?
I don't understand the problem.
You need to call the menu two times.
First to get the menu entries.
Use smarty {capture} to assign the output to a var. (to avoid processing the menu for each content again):
Second to get the content output.
There you place for each content the menu we just captured:
This will give you the content of all pages wrapped in a div with id="[pagealias]" and an anchor link named with the page content alias (to be able to use your site without js).
All you need to do now is to create a menu template that just links to that anchors:
If the anchorlinks still cause a reloading of the page you can prepend the root_url to the menulink:
Additionally you need a js that tells jQuery what to do if links of class "scrollto" are clicked but returns false:
I don't understand what this has to do with mod_rewrite.
You need to call the menu two times.
First to get the menu entries.
Use smarty {capture} to assign the output to a var. (to avoid processing the menu for each content again):
Code: Select all
{capture assign="menu"}{menu ... }{/capture}
There you place for each content the menu we just captured:
Code: Select all
{foreach from=$nodelist item=node}
<div id="{$node->alias}" class="scrollto_container">
<a name="{$node->alias}"></a>
<div class="menu">{$menu}</div>
<div class="content">
{eval var=$cgsimple->get_page_content($node->alias)}
</div>
</div>
{/foreach}
All you need to do now is to create a menu template that just links to that anchors:
Code: Select all
{foreach from=$nodelist item=node}
...
<a href="#{$node->alias}" class="scrollto">{$node->menutext}</a>
...
{/foreach}
Code: Select all
<a href="{root_url}#{$node->alias}" class="scrollto">{$node->menutext}</a>
Additionally you need a js that tells jQuery what to do if links of class "scrollto" are clicked but returns false:
Code: Select all
//
I don't understand what this has to do with mod_rewrite.
Last edited by NaN on Fri Oct 08, 2010 10:27 am, edited 1 time in total.
Re: {content item=page}?
Thanks for the answers, I get the content in separates div and create the respective menu fixed in the header pointing to the divs. My probem is how deactivate or disable the links.
An explantion.
if you create the following link in a simple html file
page don`t do nothing. right? don't go anywhere.
but if a create this same link in a content page of CMSMS or in menu, IT send me to the home page, I don't wanna go to the homepage!!
I explain well? I want create dead links, but I can't... and don`t know why. Maybe this is a feature of the CMSMS?.
An explantion.
if you create the following link in a simple html file
page don`t do nothing. right? don't go anywhere.
but if a create this same link in a content page of CMSMS or in menu, IT send me to the home page, I don't wanna go to the homepage!!
I explain well? I want create dead links, but I can't... and don`t know why. Maybe this is a feature of the CMSMS?.
Re: {content item=page}? [solved]
Well, with default template the problem was solved. I trying a test site with 5 page anyone with a diferent template, the last one using the scroll. Just when a turn it to a default, all works fine!!.
Re: {content item=page}? [solved]
I don't believe the problem is solved - it is just masked because your links now point to the page this is the new page. So the page is reloading but it does not look different because it is loading the page that you are already on.
You will run into issue if you use this menu on other pages - your links will lead back to the (no new) default page.
Just saying!
Sanjay
You will run into issue if you use this menu on other pages - your links will lead back to the (no new) default page.
Just saying!
Sanjay
Re: {content item=page}? [solved]
Yes, you're right, but at least work
, and don't know how to kill the links to avoid the redirection.
Re: {content item=page}? [solved]
If you give us access to a dev site perhaps we can help you fiz the problem instead of just masking it. Normally using onclick="return false;" disables the default behavior of the tag. You said it did not work for you, but it hard to know what else is interfering with that.
Try this piece of code in a simple html page (or anywhere in your template):
You will see the link but it is inactive (or at least it should be). If not, there's something else going on and only being able to look into your specific setup will we be able to help out more.
Sanjay
Try this piece of code in a simple html page (or anywhere in your template):
Code: Select all
<a href="http://yahoo.com" onclick="return false;">Disabled link</a>Sanjay
-
NaN
Re: {content item=page}? [solved]
@Ruben_c: Are there any other javascripts that has influence of the link behaviour?
Last edited by NaN on Sun Oct 10, 2010 6:19 pm, edited 1 time in total.
Re: {content item=page}? [solved]
Yes with some frameworks like jQuery you can override default behavior. For instance one can do the following:
This will prevent the default behavior of ALL links on the page. So not knowing what else may have this kind of effect on the original poster's problematic page makes it harder to figure out what else is going no.
NaN - as I finish typing this I realize that you may not have been asking the question of me, but of the original poster. I'll leave my comment here anyway, so he can get an idea of other potential problem sources.
S
Code: Select all
$(document).ready(function() {
$('a').click(function(e) {
e.preventDefault();
});
});NaN - as I finish typing this I realize that you may not have been asking the question of me, but of the original poster. I'll leave my comment here anyway, so he can get an idea of other potential problem sources.
S
-
NaN
Re: {content item=page}? [solved]
Rightspcherub wrote:
NaN - as I finish typing this I realize that you may not have been asking the question of me, but of the original poster.
Marked it with an "@Ruben_c".
Just wanted to know if there is some javascript that returns true or anything else but false if this link is clicked. So that an onclick="return false;" maybe would have no effect.
Another question @Ruben:
Is the base tag used in your template?
How does it look like? If there is any difference between your base url and the currently loaded url in address bar the browser might load the base url apending the # (cause he thinks it is anchor on another page).

