[pmwiki-users] Conditional If statement being displayed on web page?
Russ
pmwiki at russhosting.com
Mon Oct 7 07:47:16 CDT 2013
Perhaps instead of trying to compensate for spaces the page name, you
can display the page {$Title} instead and set the (:title: ) of the wiki
page accordingly?
Russ
On 2013-10-07 5:48 AM, Matt Clinton wrote:
> Hi,
>
> I am looking to do this for the Group part at the top of the page and
> then I will want to do the same for the Page name. You will find what
> I am working on at this link: http://matt.impressedpaving.co.uk/
>
> You will see where pmWiki is placing the if statement on the web page,
> this is why I need to make it work in the template file as this is not
> generated in the 'Edit' page content.
>
> Regards,
>
> Matt Clinton
> 65bit Software Limited
> www.65bit.com <http://www.65bit.com>
>
>
>
>
> On 7 Oct 2013, at 10:42, Simon <nzskiwi at gmail.com
> <mailto:nzskiwi at gmail.com>> wrote:
>
>> I'm not exactly sure what you are trying to achieve, but
>> try something like
>> (:if equal "{$Groupspaced}" "Easy Catalog":)
>> [[{$Group}/]]
>> (:else:)
>> [[{$Groupspaced}/]]
>> (:ifend:)
>>
>>
>> On 7 October 2013 22:31, Matt Clinton <mclinton at 65bit.com
>> <mailto:mclinton at 65bit.com>> wrote:
>>
>> Hi,
>>
>> So there is no way for me to do an if statement to decide on
>> which variable to use? Our product does not have a space in the
>> name which is why I don't want it to show with spaces, however if
>> I change this to $Group variable it then messes it up for other
>> pages as they do not have spaces anymore.
>>
>> There must be a way to do this? Is it pmwiki's security that is
>> stopping me from executing this in the tmpl file?
>>
>> Regards,
>>
>> Matt Clinton
>> 65bit Software Limited
>> www.65bit.com <http://www.65bit.com/>
>>
>>
>>
>>
>> On 7 Oct 2013, at 10:22, Simon <nzskiwi at gmail.com
>> <mailto:nzskiwi at gmail.com>> wrote:
>>
>>> Only works within PmWiki pages themselves.
>>> You can add this sort of markup in your page, properly that is
>>> where it should be (ie no content in template)
>>>
>>>
>>> On 7 October 2013 22:09, Matt Clinton <mclinton at 65bit.com
>>> <mailto:mclinton at 65bit.com>> wrote:
>>>
>>> Hi,
>>>
>>> I have been trying multiple methods of doing this, php IF
>>> statement, smarty IF statement and now the pmWiki IF
>>> statement used in the Cookbook. However it seems like pmwiki
>>> just is not executing my code but rather displaying it on
>>> the web page? If I put this in a separate file and include
>>> this file, the include line seems to look commented out when
>>> inspecting the element in a web browser.
>>>
>>> Please find below the code I am using in my 'skin.tmpl' file:
>>>
>>> <div id="content-container">
>>> <div id="content">
>>> <!--PageTitleGroupFmt-->
>>> <p class="grouptitle">
>>> (:if equal "{$Groupspaced}" "Easy Catalog":)
>>> <a href='{$ScriptUrl}/{$Group}' class="pagegroup">{$Group}</a>
>>> (:else:)
>>> <a href='{$ScriptUrl}/{$Group}'
>>> class="pagegroup">{$Groupspaced}</a>
>>> (:ifend:)
>>> </p>
>>> <!--/PageTitleGroupFmt-->
>>> </div>
>>> </div>
>>>
>>> If anyone could shed some light on this that would be great,
>>> I have attached an image of how it looks on the web page.
>>>
>>> Regards,
>>>
>>> Matt Clinton
>>> 65bit Software Limited
>>> www.65bit.com <http://www.65bit.com/>
>>>
>>> <PastedGraphic-1.tiff>
>>>
>>>
>>>
>>> _______________________________________________
>>> pmwiki-users mailing list
>>> pmwiki-users at pmichaud.com <mailto:pmwiki-users at pmichaud.com>
>>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>>
>>>
>>>
>>>
>>> --
>>> ____
>>> http://kiwiwiki.co.nz <http://kiwiwiki.co.nz/>
>>
>>
>>
>>
>> --
>> ____
>> http://kiwiwiki.co.nz <http://kiwiwiki.co.nz/>
>
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20131007/f893f5a8/attachment.html>
More information about the pmwiki-users
mailing list