photo

Drew Buglione

shared this idea
6 years ago

Employees Involved

photo

Ryan Bonham

Admin

photo

PIV Support

Admin

Statistics

2
Comments
562
Views

Relates to

Share

2
votes

"current_page" Template Tag

I'm currently designing a navigation menu for my site, and something I like to do is bold the link to the current page.

On other sites I've designed, adding a "current_page" PHP variable to each individual page is easy enough. Then, I can just do something like:

<?php if ($current_page == "home") echo "<a href=\"[url_index]\"><strong>Home</strong></a>"; else echo "<a href=\"[url_index]\">Home</a>"; ?>

It would probably be easy enough to add something like this to OpenRealty, no? Could it be done as an add-on, perhaps?

Thanks!

~Drew Carey Buglione

Under Consideration
+1 I like this idea
Add Comment

Comments (2)

photo Employee
1

You'd need to build an add-on if you want to perform conditional PHP logic within an OR template.

Otherwise OR does have a {site_title} tag which will display the title for whatever page. For Page editor and Blog Publisher pagess for instance this will display the "Post Title" you have entered. For listing detail pages this will display the listing's "Title".

photo Employee
1

Alane,

I removed the code you posted, it exposes the site to XSS attacks. If you are using that on your live site, you should remove it and have an experienced developer help you make the code safe.

Leave Comment

photo

Attach files...

The file must be a jpg, gif, png, bmp, ico, pdf, doc, rtf, txt, zip or rar no more than 20M