Hi Sanjeev,
sorry for my late answer.
 
My solution did not take in mind that at the time the render tag is being 
executed the URLs if internal pages are not in the final format. This is 
still in a intermediate Format and the publishing process replaces them 
later to the correct ones.
 
As far as I see you have two options:
- Replace the filenames on delivering the files (e.g. in Delivery Server or 
PHP/Python/ASP.NET or what ever you are using).
- Publish the files without an extension (use ".", just a dot) as setting 
in the CMS (either for publication package or publishing settings).
 
As any of These suitable for you?
 
Best,
Hilmar Bunjes
erminas GbR
http://www.erminas.com

 

> Hi Hilmar,
>
> Many thanks for getting back to me.  Yes we have rewrite rules on our 
> server to remove the .htm for published pages.  I have tried
>  <reddot:cms>
>                                                   < foreach 
> itemname="childPages" 
> object="Context:Indexes.GetIndexByPageId(Guid:021743AA8509473C9615A4BA5C2BAC32).SubIndexes"
>  
> countername="pageCounter">
>                               
>                       < htmltext><dd><a href="<%!! 
> Store:childPages.GetUrl(Bool:True).Replace(".htm","")  !!%>"><%!! 
> Store:childPages.Headline !!%></a></dd></htmltext>
>                                                   < /foreach>
>  </reddot:cms>
>
> with and without using preexecute but unfortunately this does not remove 
> the .htm from our pages.  it also does not show any syntax errors so not 
> really sure what else to try. 
>
> Regards,
>
> Sanjeev
>
> On Tuesday, 16 July 2013 21:40:15 UTC+1, Hilmar Bunjes wrote:
>>
>> We have the following code used to present a list of URLs:
>>> <reddot:cms>
>>>                                                   <foreach 
>>> itemname="childPages" 
>>> object="Context:Indexes.GetIndexByPageId(Guid:021743AA8509473C9615A4BA5C2BAC32).SubIndexes"
>>>  
>>> countername="pageCounter">
>>>                                                     <htmltext><dd><a 
>>> href="<%!! Store:childPages.GetUrl(Bool:True)  !!%>"><%!! 
>>> Store:childPages.Headline !!%></a></dd></htmltext>
>>>                                                   </foreach>
>>>  </reddot:cms>
>>>
>>> and want to return clean urls from <%!! 
>>> Store:childPages.GetUrl(Bool:True)  !!%> so 
>>> http://www.mysite.com/thispage.htm is published as 
>>> http://www.mysite.com/thispage
>>>
>>  
>> The links you are editing above to not influence the names of the 
>> published files but just the links to those pages. If you Change the links 
>> in this place and have no rewrite rules on your server you will get invalid 
>> links. To change the extensions during publication you must do the setting 
>> in the publ. packages.
>>  
>>
>>>
>>> I have tried:
>>>  <reddot:cms>
>>>                                                   <foreach 
>>> itemname="childPages" 
>>> object="Context:Indexes.GetIndexByPageId(Guid:4595E6AE30D243E6AB11DAE0553A90B7).SubIndexes"
>>>  
>>> countername="pageCounter">
>>>                                                     <htmltext><dd>
>>> <%
>>>  DocSectionURL = "<%!! Store:childPages.GetUrl(Bool:True)!!%>"
>>>  DocNewSectionURL = Replace(DocSectionURL,".htm","")
>>> %>
>>> <a href="<% response.write(DocNewSectionURL) %>"><%!! 
>>> Store:childPages.Headline !!%></a></dd></htmltext>
>>>                                                   </foreach>
>>> </reddot:cms>
>>>
>> To get the links without the .htm Extension you can do the following (use 
>> .NET "Replace" in the RenderTag instead of preexecute):
>>  
>>  <reddot:cms>
>>                                                   < foreach 
>> itemname="childPages" 
>> object="Context:Indexes.GetIndexByPageId(Guid:021743AA8509473C9615A4BA5C2BAC32).SubIndexes"
>>  
>> countername="pageCounter">
>>                                                     < htmltext><dd><a 
>> href="<%!! Store:childPages.GetUrl(Bool:True).Replace(".htm","")  !!%>"><%!! 
>> Store:childPages.Headline !!%></a></dd></htmltext>
>>                                                   < /foreach>
>>  </reddot:cms>
>>  
>> HTH
>>  
>> Best regards,
>> Hilmar Bunjes
>> http://www.smartapi.de
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to