You can also get this info by loading the page via RQL -  it's in the
name element I believe, but I don't think that will solve your
problem.
It only gives you the name as found in the properties of the page.
If this his blank, it doesn't populate it with the result of the
algorithm RD uses to create the page name for you (e.g. GUID v.s. ID,
and 3 or 4 different places to set the extension)

I don't think you can actually find the true URL at the time of pre-
execute without following the same logic as RD does to determine it.
(i.e. checking the various places you can set the extension, in the
correct order of precedence )
Unless, of course, you know for sure that the extension you are
looking to match is only ever set as part of the file name in page
properties.

My guess is that you don't want to include some abc language code if
the extension isn't .abc
Can you tell us a little bit more about what you are trying to do and
maybe we can suggest an alternate way of doing it.

Wayne.


On Jul 18, 6:25 pm, ArryD <[email protected]> wrote:
> Hi Daniel
>
> If you want to try RQL have a look at the listnames query. This is
> from the RQL documentation:
>
> "Use this RQL query to list all file names of existing pages in a
> project.
>
> You assign file names to determine the file name of a published page.
> When no file name is assigned, the page is published using the page ID
> or page GUID as a file name."
>
> Query Example:
>
> <IODATA loginguid="[!guid_login!]" sessionkey="[!key!]">
>   <PROJECT>
>     <PAGES action="listnames"/>
>   </PROJECT>
> </IODATA>
>
> Server Response:
>
> PAGE:   The PAGE element is repeated for every page with a file name
> guid:   GUID of the page
> headline:       Headline of the page
> name:   File name of the page
>
> Example Response:
>
> <IODATA>
>   <PAGES>
>     <PAGE guid="[!guid_page!]" headline="page headline"
>      name="filename.htm" />
>     ...
>   </PAGES>
> </IODATA>
>
> So you would use the guid of the page you are checking to get the file
> name of the page. Hope this helps.
>
> Cheers - Aaron
>
> On Jul 16, 10:30 pm, Daniel <[email protected]> wrote:
>
> > Hello all,
>
> > I want to use some PreExecute Code or RenderTag in a PageTemplate to
> > prevent a part of the template of being published, if the Filename of
> > the published file does not match a certain extension. I tried
> > different things to have this work, but every single try failed with
> > the same result.
>
> > I tried the following:
> > - Render Tags: Context:CurrentMasterPage.GetUrl().EndsWith(Str:php)
> > - Prexecute substr() combined with the
> > Context:CurrentMasterPage.GetUrl()
> > - Prexecute substr() combined with an info element "Page: Published
> > file name"
>
> > The point is that "Context:CurrentMasterPage.GetUrl()" or the info
> > element use to return the correct filename as long as I use it alone
> > or write it directly to the page via an echo for example. But if I use
> > the rendertag EndsWith-method, or the php substr (or any other), then
> > the URL or page name string gets changed in a string like this:
> > /*--IOHREFBEGIN linkguid=GUID pageguid=GUID projectvariantguid=GUID
> > languagevariantguid=GUID islink=1 type=1002 subtype=20*//*--IOHREFEND-
> > */
>
> > If someone out there has an idea how I can solve this, or why RedDot
> > does behave like this, or how I can get around this behavior, I will
> > be more than happy.
>
> > Best regards,
> > Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reddot-cms-users?hl=en.

Reply via email to