• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [solved] Re: Site images broke when using internal pretty urls
PostPosted: Mon Feb 09, 2009 3:57 am 
Offline
Forum Members
Forum Members

Joined: Fri Dec 26, 2008 9:29 pm
Posts: 29
Hello all!

I'm having a similar problem but with anchors.

  • Pretty urls are enabled and needed for SEO
  • Links to anchors on the same page return the browser to the base URL + anchor (e.g., http://www.example.com/#myAnchor)
  • Anchors work with {metadata showbase="false"} but images now do not work

Is there a way to have anchors and images working with pretty urls? Thanks for your help.

180michael

cmsms 1.5.2, php 5.2.5, apache 2.0


Last edited by 180michael on Thu Mar 05, 2009 5:53 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Sun Feb 15, 2009 8:30 am 
Offline
Beta Tester
Beta Tester
User avatar

Joined: Tue Nov 21, 2006 5:05 pm
Posts: 217
Location: Nashville, USA
I'm having trouble posting -  sorry if this is a duplicate!!!!

Try using the anchor or cms_selflink tag - see Extensions, Tags.

Keep in mind that if you just use it will reference the root of the CMSMS install. So you have to reference the page you are on.  You can hard code the page so it is like

you might be able to use {$page_id}::
but if the page is a child of a parent page, the parent page will not be given.  It will not generate "parent-page/child-page/#your-anchor"

Another approach, is to modify the User Defined Tag I posted for rel="canonical" links to get the current page, (
http://forum.cmsmadesimple.org/index.ph ... #msg146490)

name this UDT something something like CurrentPage:

Code:
global $gCms;
if ($gCms->variables['page_name'] !='') {
   $manager =& $gCms->GetHierarchyManager();
   $node =& $manager->sureGetNodeByAlias($gCms->variables['page_id']);
   
   $content =& $node->GetContent();
   if (isset($content) && is_object($content))
   {
      if ($content->GetURL() != '')
      {
      echo $content->GetURL();
      }
   }
}


Then call it as part of your anchor
and the HTML generated will be
http://www.your-domain.com/your-page-alias/#your-anchor

_________________
--
LinkedIn.com
--
Internal Page 301 Redirect
--
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo


Top
 Profile  
 
 Post subject: Re: Site images broke when using internal pretty urls
PostPosted: Tue Feb 24, 2009 6:32 pm 
Offline
Forum Members
Forum Members

Joined: Fri Dec 26, 2008 9:29 pm
Posts: 29
This worked fine for me. Thank you!

I do wish it was a little easier for clients though who don't know or want to use smarty tags. How easy would it be to parse links for sites that are using pretty urls?


Top
 Profile  
 
 Post subject: Re: [solved] Re: Site images broke when using internal pretty urls
PostPosted: Mon Mar 15, 2010 10:58 am 
If you won't make an UDT you can use the var $page_alias

But good to know the UDT if  in an case the page_alias doesn't work


Top
  
 
 Post subject: Re: [solved] Re: Site images broke when using internal pretty urls
PostPosted: Fri Sep 24, 2010 8:56 am 
Offline
New Member

Joined: Fri Sep 24, 2010 8:36 am
Posts: 5
its the template as well or it is the template thats is been thrown out


Top
 Profile  
 
 Post subject: Re: [solved] Re: Site images broke when using internal pretty urls
PostPosted: Sat Oct 16, 2010 5:25 am 
Offline
New Member

Joined: Sat Oct 16, 2010 5:19 am
Posts: 1
Try using the anchor or cms_selflink tag - see Extensions, Tags.


Last edited by Anonymous on Sat Oct 16, 2010 8:13 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner