PDA

View Full Version : check the current page


Madamko
06-26-2014, 09:42 AM
Hello,

How can I check if user has open list of articles or concrete article?
(user can click on Articles in main menu and then choose from one of several articles on my web)

Should I check current url? Or is there any other more elegant way? For example any vbulletin variables?

for example :
list of articles (previews) has url: name_of_my_forum/articles
or: name_of_my_forum/articles/category

concrete article: name_of_my_forum/articles/category/1-test-article

Thanks in advance.

Dead Eddie
06-26-2014, 12:14 PM
From where would you like to check? For what purpose?

Madamko
06-26-2014, 02:00 PM
I guess template would be best option.
I have absolutely another design for cms sections of my web. That's why I need to change unique identificators of elements. After that I would be able to write custom css for articles section.

I found out that "previews" and concrete article have almost same structure. And all changes of article mixed up my article preview list. That was my problem :) And that's why I need to distinguish somehow these pages.

Dead Eddie
06-28-2014, 11:24 PM
After a quick look, I didn't see anything. Looks like using the URL might be your best bet.

Madamko
07-02-2014, 10:08 AM
Thanks! :) It is working now