Jump to content

Targeting [data-pagecontroller="page"] & custom pages


DesignzShop

Recommended Posts

Hello,

Maybe I'm missing something here and someone will correct me however, not sure I am wrong. It appears we can't target specific custom made pages but we can target pages that include for example a article with [data-pageID="xx"].

So for example this code below could target a article but not the article index.

body[data-pageapp="cms"][data-pagelocation="front"][data-pagemodule="pages"][data-pagecontroller="page"][data-pageID="2"]

 

If I have created a custom page named for example "mycustompage" and it's just a html page with no database I should be able to target that page specifically using the pages specific page id but I can't seem to do that. Actually the code above should target pageID=2, the second page I made in pages acp, instead it targets article 2. Can we please get a way to target specific custom pages for css themselves? I suggest being able to identify a specific custom page by using it's name or better yet creating a new id or controller for pages.

body[data-pageapp="cms"][data-pagelocation="front"][data-pagemodule="pages"][data-pagecontroller="page"][data-pageID="mycustompage"]
body[data-pageapp="cms"][data-pagelocation="front"][data-pagemodule="pages"][data-pagecontroller="page"][data-custompageID="x"]

or

body[data-pageapp="cms"][data-pagelocation="front"][data-pagemodule="pages"][data-pagecontroller="mycustompage"]
body[data-pageapp="cms"][data-pagelocation="front"][data-pagemodule="pages"][data-cmspagecontroller="x"]

 

Let me also add we don't need to use a name, a new ID or controller could be introduced just for pages..

Again,, maybe I'm missing something here, if I am I apologize for the ignorance.

Kind Regards

Link to comment
Share on other sites

1 minute ago, DesignzShop said:

Can we please get a way to target specific custom pages for css themselves?

What’s the use case? If you want to add page-specific CSS to just one or a few custom page, you just create a page-specific CSS file and select it in the page settings. 

1366387508_Bildschirmfoto2020-01-12um21_03_34.thumb.png.0c48be35ec040718e084792910987d2d.png

1003371231_Bildschirmfoto2020-01-12um21_05_27.thumb.png.1ab6c6e02e91754e18cfcfb32af49819.png

Since that possibility exists, there is usually no need to add CSS globally and then narrow it down to a page again. 

Link to comment
Share on other sites

Quote

Since that possibility exists, there is usually no need to add CSS globally and then narrow it down to a page again.

@opentype 

Specific case use in custom applications.

Let's say I created a slider for my themes however (Which I have had for years in my themes), I want to give the user the option to include or exclude the slider from a specific page they've created, your suggestion seems a bit much work for that. I can create the necessary field to just add the page name they can exclude that application from or add it to.

Another example would be let's say my end user just wants that slider on their pages index as you enter their site, they should be able to do this easily by targeting that page instead of the need for that to be used throughout pages.

I can also let's say for forums do this, I don't see why it should be so difficult for a single custom page. If I want to add a background for example to a specific forum I can do that by ID, you can't do that with a custom page without the process you are referring too. Custom pages should be identified and target-able imo.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...